network plugin: Don't access values in an already freed array.
authorFlorian Forster <octo@noris.net>
Wed, 21 Apr 2010 14:19:53 +0000 (16:19 +0200)
committerFlorian Forster <octo@noris.net>
Wed, 21 Apr 2010 14:19:53 +0000 (16:19 +0200)
src/network.c

index c34eb38..054dc88 100644 (file)
@@ -720,11 +720,11 @@ static int parse_part_values (void **ret_buffer, size_t *ret_buffer_len,
                    break;
 
                  default:
-                   sfree (pkg_types);
-                   sfree (pkg_values);
                    NOTICE ("network plugin: parse_part_values: "
                        "Don't know how to handle data source type %"PRIu8,
                        pkg_types[i]);
+                   sfree (pkg_types);
+                   sfree (pkg_values);
                    return (-1);
                } /* switch (pkg_types[i]) */
        }