Przeglądaj źródła

ENH: fix possible free memory use

Bill Hoffman 19 lat temu
rodzic
commit
2b33498c03
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      Utilities/cmxmlrpc/xmlrpc_curl_transport.c

+ 4 - 1
Utilities/cmxmlrpc/xmlrpc_curl_transport.c

@@ -589,7 +589,10 @@ rpcCreate(xmlrpc_env *             const envP,
                     destroyCurlTransaction(rpcP->curlTransactionP);
         }
         if (envP->fault_occurred)
-            free(rpcP);
+          {
+          free(rpcP);
+          rpcP = 0; /* set this to null as it is used later on */
+          }
     }
     *rpcPP = rpcP;
 }