Code

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 c34eb38e32670c03530da22d689bdab315e47523..054dc88b325e1f3d69b20b0f26c3902d80af6942 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]) */
        }