chiark / gitweb /
journal-gatewayd: minor cleanup
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 25 Nov 2012 15:36:46 +0000 (16:36 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 25 Nov 2012 17:04:03 +0000 (18:04 +0100)
src/journal/journal-gatewayd.c

index 3546279..63d9744 100644 (file)
@@ -328,14 +328,13 @@ static int request_parse_range(
 
                 colon2 = strchr(colon + 1, ':');
                 if (colon2) {
 
                 colon2 = strchr(colon + 1, ':');
                 if (colon2) {
-                        char *t;
+                        char _cleanup_free_ *t;
 
                         t = strndup(colon + 1, colon2 - colon - 1);
                         if (!t)
                                 return -ENOMEM;
 
                         r = safe_atoi64(t, &m->n_skip);
 
                         t = strndup(colon + 1, colon2 - colon - 1);
                         if (!t)
                                 return -ENOMEM;
 
                         r = safe_atoi64(t, &m->n_skip);
-                        free(t);
                         if (r < 0)
                                 return r;
                 }
                         if (r < 0)
                                 return r;
                 }