aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-07 18:43:40 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-07 18:43:40 +0000
commit174ab5aba2bdfde8a4614bf0069a33a7bbe57ce7 (patch)
treee77d0b411f6e60369ab5a7fb2d89b351f265d5f3 /src/util
parent1e672718b471fe766ac72aa96781552d1678986b (diff)
downloadgnunet-174ab5aba2bdfde8a4614bf0069a33a7bbe57ce7.tar.gz
gnunet-174ab5aba2bdfde8a4614bf0069a33a7bbe57ce7.zip
fix #1885
Diffstat (limited to 'src/util')
-rw-r--r--src/util/strings.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/strings.c b/src/util/strings.c
index dc4037a1f..58a4847bc 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -236,11 +236,15 @@ GNUNET_STRINGS_fancy_size_to_bytes (const char *fancy_size,
236 ret += last; 236 ret += last;
237 last = 0; 237 last = 0;
238 if (1 != sscanf (tok, "%llu", &last)) 238 if (1 != sscanf (tok, "%llu", &last))
239 {
240 GNUNET_free (in);
239 return GNUNET_SYSERR; /* expected number */ 241 return GNUNET_SYSERR; /* expected number */
242 }
240 } 243 }
241 } 244 }
242 ret += last; 245 ret += last;
243 *size = ret; 246 *size = ret;
247 GNUNET_free (in);
244 return GNUNET_OK; 248 return GNUNET_OK;
245} 249}
246 250
@@ -311,11 +315,15 @@ GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_size,
311 ret += last; 315 ret += last;
312 last = 0; 316 last = 0;
313 if (1 != sscanf (tok, "%llu", &last)) 317 if (1 != sscanf (tok, "%llu", &last))
318 {
319 GNUNET_free (in);
314 return GNUNET_SYSERR; /* expected number */ 320 return GNUNET_SYSERR; /* expected number */
321 }
315 } 322 }
316 } 323 }
317 ret += last; 324 ret += last;
318 rtime->rel_value = (uint64_t) ret; 325 rtime->rel_value = (uint64_t) ret;
326 GNUNET_free (in);
319 return GNUNET_OK; 327 return GNUNET_OK;
320} 328}
321 329