mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-20 02:38:43 +00:00
- ng_address_ID() has already freed the message, don't do double free.
- Get error from ng_address_ID(). Reported by: Coverity via pjd
This commit is contained in:
parent
dfa8edfec6
commit
c6964951c6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163460
@ -962,17 +962,13 @@ _ngi_hook(item_p item, char *file, int line)
|
|||||||
ng_ID_t _dest = NGI_RETADDR(item); \
|
ng_ID_t _dest = NGI_RETADDR(item); \
|
||||||
NGI_RETADDR(item) = 0; \
|
NGI_RETADDR(item) = 0; \
|
||||||
NGI_MSG(item) = resp; \
|
NGI_MSG(item) = resp; \
|
||||||
if ((ng_address_ID((here), (item), \
|
if ((error = ng_address_ID((here), (item), \
|
||||||
_dest, 0)) == 0) { \
|
_dest, 0)) == 0) { \
|
||||||
SAVE_LINE(item); \
|
SAVE_LINE(item); \
|
||||||
(error) = ng_snd_item((item), NG_QUEUE);\
|
(error) = ng_snd_item((item), NG_QUEUE);\
|
||||||
} else { \
|
|
||||||
NG_FREE_ITEM(item); \
|
|
||||||
(error) = EINVAL; \
|
|
||||||
} \
|
} \
|
||||||
} else { \
|
} else \
|
||||||
NG_FREE_ITEM(item); \
|
NG_FREE_ITEM(item); \
|
||||||
} \
|
|
||||||
(item) = NULL; \
|
(item) = NULL; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user