diff subopt-helper.c @ 32511:b39155e98ac3

Remove some useless NULL pointer checks before invoking free() on the pointer. patch by From: Clment Bsch, ubitux gmail com
author diego
date Sun, 07 Nov 2010 12:47:40 +0000
parents fdf3f93c2828
children 08a90b0e44e1
line wrap: on
line diff
--- a/subopt-helper.c	Sun Nov 07 11:03:47 2010 +0000
+++ b/subopt-helper.c	Sun Nov 07 12:47:40 2010 +0000
@@ -226,8 +226,7 @@
                   tmp.str = NULL;
                   tmp.len = 0;
                   last = parse_str( &str[parse_pos], &tmp );
-                  if (*valp)
-                    free(*valp);
+                  free(*valp);
                   *valp = NULL;
                   if (tmp.str && tmp.len > 0) {
                     *valp = malloc(tmp.len + 1);