Fixed memory leak in NgSendAsciiMsg().

This commit is contained in:
ru 2004-01-27 18:38:22 +00:00
parent 38230899d9
commit 89536c60f8

View File

@ -132,8 +132,11 @@ NgSendAsciiMsg(int cs, const char *path, const char *fmt, ...)
/* Send node a request to convert ASCII to binary */
if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, NGM_ASCII2BINARY,
(u_char *)ascii, sizeof(*ascii) + ascii->header.arglen) < 0)
(u_char *)ascii, sizeof(*ascii) + ascii->header.arglen) < 0) {
free(ascii);
return (-1);
}
free(ascii);
/* Get reply */
if (NgRecvMsg(cs, reply, sizeof(replybuf), NULL) < 0)