Remove trailing dead NULL-assignments from sepoltransFree()
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 30 May 2011 09:25:04 +0000 (12:25 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 30 May 2011 09:25:04 +0000 (12:25 +0300)
- Replace assignments with a memset() to blast away the contents instead,
  taking care of other members too

plugins/sepolicy.c

index a0a9ccc..b0c07a2 100644 (file)
@@ -349,9 +349,10 @@ static sepoltrans *sepoltransFree(sepoltrans * pt)
        semanage_handle_destroy(pt->sh);
     }
 
-    pt->semodulepath = _free(pt->semodulepath);
+    free(pt->semodulepath);
+    memset(pt, 0, sizeof(*pt)); /* trash and burn */
 
-    pt = _free(pt);
+    free(pt);
     return NULL;
 }