fixing error in cleanup if magic db can't be loaded
authorElena Reshetova <elena.reshetova@intel.com>
Thu, 17 Jan 2013 14:20:02 +0000 (16:20 +0200)
committerAnas Nashif <anas.nashif@intel.com>
Sun, 3 Feb 2013 00:44:45 +0000 (16:44 -0800)
plugins/msm-plugin.c

index b62ab8a8a6df5d745af818e9868bb3703e544b8c..4556102fe7fd2c2ce0f603a136e095c564b5e7a6 100644 (file)
@@ -152,6 +152,7 @@ rpmRC PLUGINHOOK_INIT_FUNC(rpmts _ts, const char *name, const char *opts)
     if (magic_load(cookie, NULL) != 0) {
        rpmlog(RPMLOG_ERR, "cannot load magic database - %s\n", magic_error(cookie));   
        magic_close(cookie);
+       cookie = NULL;
        return RPMRC_FAIL;
     }