Browse code

pe - correcting memory loss caused by double string allocation

Mickey Sola authored on 2017/04/22 00:50:47
Showing 1 changed files
... ...
@@ -2357,7 +2357,7 @@ static inline int hash_impfns(cli_ctx *ctx, void **hashctx, uint32_t *impsz, str
2357 2357
                 }
2358 2358
             } else {
2359 2359
                 /* ordinal lookup */
2360
-                funcname = cli_strdup(pe_ordinal(dllname, thunk64.u.Ordinal & 0xFFFF));
2360
+                funcname = pe_ordinal(dllname, thunk64.u.Ordinal & 0xFFFF);
2361 2361
                 if (funcname == NULL) {
2362 2362
                     cli_dbgmsg("scan_pe: cannot duplicate function name\n");
2363 2363
                     return CL_EMEM;