X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FUtil.c;fp=perl%2FAmanda%2FUtil.c;h=4357d9f5b1b91862ece2e202217d206de16549fd;hb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;hp=164245d8d8cc8241978aca9fd049895eeb0e88bc;hpb=c6f0a88c567f8536c498f554285aed1f8150da18;p=debian%2Famanda diff --git a/perl/Amanda/Util.c b/perl/Amanda/Util.c index 164245d..4357d9f 100644 --- a/perl/Amanda/Util.c +++ b/perl/Amanda/Util.c @@ -2063,6 +2063,7 @@ XS(_wrap_sanitise_filename) { result = (char *)sanitise_filename(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + free((char*)result); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); @@ -2092,6 +2093,7 @@ XS(_wrap_quote_string) { result = (char *)quote_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + free((char*)result); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); @@ -2121,6 +2123,7 @@ XS(_wrap_unquote_string) { result = (char *)unquote_string(arg1); ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + free((char*)result); XSRETURN(argvi); fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); @@ -2249,8 +2252,10 @@ XS(_wrap_split_quoted_strings) { for (iter = result; *iter; iter++) { ST(argvi) = sv_2mortal(newSVpv(*iter, 0)); + g_free(*iter); argvi++; } + g_free(result); } } if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);