diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2015-07-19 18:05:49 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2015-07-19 18:05:49 +0000 |
| commit | 9694aad375a728ba4963c96f8f564aab369a685e (patch) | |
| tree | 4ee41e1c181262a0dbab3733d7306da5da18332c /sys/dev/netmap | |
| parent | 05f7605789e29f4420c82a7e353bee658c333823 (diff) | |
Notes
Diffstat (limited to 'sys/dev/netmap')
| -rw-r--r-- | sys/dev/netmap/netmap_pipe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/netmap/netmap_pipe.c b/sys/dev/netmap/netmap_pipe.c index 3fe29bb2ff9c6..67e840248c884 100644 --- a/sys/dev/netmap/netmap_pipe.c +++ b/sys/dev/netmap/netmap_pipe.c @@ -616,7 +616,7 @@ netmap_get_pipe_na(struct nmreq *nmr, struct netmap_adapter **na, int create) sna = malloc(sizeof(*mna), M_DEVBUF, M_NOWAIT | M_ZERO); if (sna == NULL) { error = ENOMEM; - goto free_mna; + goto unregister_mna; } /* most fields are the same, copy from master and then fix */ *sna = *mna; @@ -666,6 +666,8 @@ found: free_sna: free(sna, M_DEVBUF); +unregister_mna: + netmap_pipe_remove(pna, mna); free_mna: free(mna, M_DEVBUF); put_out: |
