From: robertl Date: Thu, 6 Jan 2005 16:24:17 +0000 (+0000) Subject: Don't leak on replacement. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~3839 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b8963fe3bc2b9006a283279ca4078fc63a2d7f31;p=gpsbabel.git Don't leak on replacement. --- diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 11d3e8783..69f0d9370 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -658,7 +658,9 @@ gstrsub(const char *s, const char *search, const char *replace) char *o = xstrdup(s); while (strstr(o, search)) { + char *oo = o; o = strsub(o, search, replace); + xfree(oo); } return o;