Move rl to the scope where its needed, dont bother assigning NULL
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Sep 2009 14:00:49 +0000 (17:00 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Sep 2009 14:00:49 +0000 (17:00 +0300)
build/spec.c

index 64abd37..a867500 100644 (file)
@@ -460,7 +460,6 @@ rpmSpec newSpec(void)
 
 rpmSpec freeSpec(rpmSpec spec)
 {
-    struct ReadLevelEntry *rl;
 
     if (spec == NULL) return NULL;
 
@@ -481,10 +480,10 @@ rpmSpec freeSpec(rpmSpec spec)
     closeSpec(spec);
 
     while (spec->readStack) {
-       rl = spec->readStack;
+       struct ReadLevelEntry *rl = spec->readStack;
        spec->readStack = rl->next;
        rl->next = NULL;
-       rl = _free(rl);
+       free(rl);
     }
     
     spec->sourceRpmName = _free(spec->sourceRpmName);