Matteo Bruni : wpp: Free the include filename on error (Valgrind).
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jun 25 13:42:03 CDT 2014
Module: wine
Branch: master
Commit: efcaad3911858be0a52a3b0606ef20ff75b8b0a2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=efcaad3911858be0a52a3b0606ef20ff75b8b0a2
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Tue Jun 24 22:25:27 2014 +0200
wpp: Free the include filename on error (Valgrind).
---
libs/wpp/ppl.l | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l
index 70bd213..9655e34 100644
--- a/libs/wpp/ppl.l
+++ b/libs/wpp/ppl.l
@@ -1586,6 +1586,7 @@ void pp_do_include(char *fname, int type)
* If the define was deleted, then this entry would have
* been deleted too.
*/
+ free(fname);
return;
}
}
@@ -1595,6 +1596,7 @@ void pp_do_include(char *fname, int type)
if(n <= 2)
{
ppy_error("Empty include filename");
+ free(fname);
return;
}
@@ -1604,6 +1606,7 @@ void pp_do_include(char *fname, int type)
if((fp = pp_open_include(fname+1, type, pp_status.input, &newpath)) == NULL)
{
ppy_error("Unable to open include file %s", fname+1);
+ free(fname);
return;
}
More information about the wine-cvs
mailing list