Fix a memory link in UPNP_GetValidIGD()
This commit is contained in:
parent
a06f847db2
commit
f9c6d4709e
|
@ -1,6 +1,9 @@
|
|||
$Id: Changelog.txt,v 1.175 2012/07/20 08:07:44 nanard Exp $
|
||||
$Id: Changelog.txt,v 1.177 2012/08/29 07:51:29 nanard Exp $
|
||||
miniUPnP client Changelog.
|
||||
|
||||
2012/08/11:
|
||||
Fix a memory link in UPNP_GetValidIGD()
|
||||
|
||||
2012/07/20:
|
||||
Disable HAS_IP_MREQN on DragonFly BSD
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: miniupnpc.c,v 1.109 2012/07/20 08:07:44 nanard Exp $ */
|
||||
/* $Id: miniupnpc.c,v 1.110 2012/08/11 05:52:48 nanard Exp $ */
|
||||
/* Project : miniupnp
|
||||
* Web : http://miniupnp.free.fr/
|
||||
* Author : Thomas BERNARD
|
||||
|
@ -947,7 +947,14 @@ UPNP_GetValidIGD(struct UPNPDev * devlist,
|
|||
}
|
||||
state = 0;
|
||||
free_and_return:
|
||||
free(desc);
|
||||
if(desc) {
|
||||
for(i = 0; i < ndev; i++) {
|
||||
if(desc[i].xml) {
|
||||
free(desc[i].xml);
|
||||
}
|
||||
}
|
||||
free(desc);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue