-
Notifications
You must be signed in to change notification settings - Fork 478
potential memory leak #225
Copy link
Copy link
Closed
Description
In function UPNP_CheckPinholeWorking,
CheckPinholeWorkingArgs = calloc(4, sizeof(struct UPNParg)); // memory allocated here
if(CheckPinholeWorkingArgs == NULL)
return UPNPCOMMAND_MEM_ALLOC_ERROR;
CheckPinholeWorkingArgs[0].elt = "UniqueID";
CheckPinholeWorkingArgs[0].val = uniqueID;
buffer = simpleUPnPcommand(-1, controlURL, servicetype,
"CheckPinholeWorking", CheckPinholeWorkingArgs, &bufsize);
if(!buffer) // if this if expression take true block, the previous allocated CheckPinholeWorkingArgs will not be freed.
return UPNPCOMMAND_HTTP_ERROR;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels