From: Nicholas Nethercote Date: Wed, 26 Jun 2002 10:06:26 +0000 (+0000) Subject: Forgot to VG_(free) a VG_(strdup)'d string. X-Git-Tag: svn/VALGRIND_1_0_3~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78578773740769f499ae728565df73be9e26ec56;p=thirdparty%2Fvalgrind.git Forgot to VG_(free) a VG_(strdup)'d string. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@468 --- diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 3ed7ee0912..6f2518b2e8 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -511,6 +511,8 @@ static void parse_cache_opt ( cache_t* cache, char* orig_opt, int opt_len ) while (VG_(isdigit)(opt[i])) i++; if ('\0' != opt[i]) goto bad; + VG_(free)(VG_AR_PRIVATE, opt); + cache->size = (Int)VG_(atoll)(opt + i1); cache->assoc = (Int)VG_(atoll)(opt + i2); cache->line_size = (Int)VG_(atoll)(opt + i3); diff --git a/vg_main.c b/vg_main.c index 3ed7ee0912..6f2518b2e8 100644 --- a/vg_main.c +++ b/vg_main.c @@ -511,6 +511,8 @@ static void parse_cache_opt ( cache_t* cache, char* orig_opt, int opt_len ) while (VG_(isdigit)(opt[i])) i++; if ('\0' != opt[i]) goto bad; + VG_(free)(VG_AR_PRIVATE, opt); + cache->size = (Int)VG_(atoll)(opt + i1); cache->assoc = (Int)VG_(atoll)(opt + i2); cache->line_size = (Int)VG_(atoll)(opt + i3);