Juan Lang : inetmib1: Fix memory leaks.

Alexandre Julliard julliard at winehq.org
Wed May 13 10:19:41 CDT 2009


Module: wine
Branch: master
Commit: 52722e663855186cb9213ad70f34813ce2863b80
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=52722e663855186cb9213ad70f34813ce2863b80

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu May  7 11:06:50 2009 -0700

inetmib1: Fix memory leaks.

---

 dlls/inetmib1/main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/inetmib1/main.c b/dlls/inetmib1/main.c
index 1093117..91f5fd5 100644
--- a/dlls/inetmib1/main.c
+++ b/dlls/inetmib1/main.c
@@ -143,7 +143,10 @@ static BOOL mib2IfNumberQuery(BYTE bPduType, SnmpVarBind *pVarBind,
 
             copyInt(&pVarBind->value, &numIfs);
             if (bPduType == SNMP_PDU_GETNEXT)
+            {
+                SnmpUtilOidFree(&pVarBind->name);
                 SnmpUtilOidCpy(&pVarBind->name, &numberOid);
+            }
             *pErrorStatus = SNMP_ERRORSTATUS_NOERROR;
         }
         else
@@ -440,6 +443,7 @@ static INT setOidWithItem(AsnObjectIdentifier *dst, AsnObjectIdentifier *base,
     AsnObjectIdentifier oid;
     INT ret;
 
+    SnmpUtilOidFree(dst);
     ret = SnmpUtilOidCpy(dst, base);
     if (ret)
     {




More information about the wine-cvs mailing list