Fix leak in error path.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Sun, 15 Nov 2009 07:14:26 +0000 (07:14 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Sun, 15 Nov 2009 07:14:26 +0000 (07:14 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@302 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/pkg.c

index 9ba44e82eafa71493952f3132bae8ea2f844fe57..1802ff0f5f2bd41736a583ad7a3f22591f44234d 100644 (file)
@@ -509,6 +509,7 @@ void set_flags_from_control(opkg_conf_t *conf, pkg_t *pkg){
      if (fp == NULL) {
             opkg_message(conf, OPKG_ERROR, "fopen(%s): %s\n",
                             file_name, strerror(errno));
+            free(file_name);
             return;
      }