Fixed memory leak in NgSendAsciiMsg().
This commit is contained in:
parent
cea1849767
commit
430b8c1b05
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125104
@ -132,8 +132,11 @@ NgSendAsciiMsg(int cs, const char *path, const char *fmt, ...)
|
|||||||
|
|
||||||
/* Send node a request to convert ASCII to binary */
|
/* Send node a request to convert ASCII to binary */
|
||||||
if (NgSendMsg(cs, path, NGM_GENERIC_COOKIE, NGM_ASCII2BINARY,
|
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);
|
return (-1);
|
||||||
|
}
|
||||||
|
free(ascii);
|
||||||
|
|
||||||
/* Get reply */
|
/* Get reply */
|
||||||
if (NgRecvMsg(cs, reply, sizeof(replybuf), NULL) < 0)
|
if (NgRecvMsg(cs, reply, sizeof(replybuf), NULL) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user