From 0a530cb06cf09b003984f98a92b8f9f12ff7af74 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 26 Jun 2002 17:02:57 +0000 Subject: [PATCH] parse_cache_opt: Move free() of opt past last use. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@469 --- coregrind/vg_main.c | 5 ++--- vg_main.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 6f2518b2e8..695d2a615f 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -511,15 +511,14 @@ 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); + VG_(free)(VG_AR_PRIVATE, opt); return; -bad: + bad: bad_option(orig_opt); } diff --git a/vg_main.c b/vg_main.c index 6f2518b2e8..695d2a615f 100644 --- a/vg_main.c +++ b/vg_main.c @@ -511,15 +511,14 @@ 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); + VG_(free)(VG_AR_PRIVATE, opt); return; -bad: + bad: bad_option(orig_opt); } -- 2.47.2