- 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:
Gleb Smirnoff 2006-10-17 10:59:39 +00:00
parent dfa8edfec6
commit c6964951c6

View File

@ -962,17 +962,13 @@ _ngi_hook(item_p item, char *file, int line)
ng_ID_t _dest = NGI_RETADDR(item); \
NGI_RETADDR(item) = 0; \
NGI_MSG(item) = resp; \
if ((ng_address_ID((here), (item), \
if ((error = ng_address_ID((here), (item), \
_dest, 0)) == 0) { \
SAVE_LINE(item); \
(error) = ng_snd_item((item), NG_QUEUE);\
} else { \
NG_FREE_ITEM(item); \
(error) = EINVAL; \
} \
} else { \
} else \
NG_FREE_ITEM(item); \
} \
(item) = NULL; \
} while (0)