projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c75179
)
Remove trailing dead NULL-assignments from sepoltransFree()
author
Panu Matilainen
<pmatilai@redhat.com>
Mon, 30 May 2011 09:25:04 +0000
(12:25 +0300)
committer
Panu 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
patch
|
blob
|
history
diff --git
a/plugins/sepolicy.c
b/plugins/sepolicy.c
index
a0a9ccc
..
b0c07a2
100644
(file)
--- a/
plugins/sepolicy.c
+++ b/
plugins/sepolicy.c
@@
-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;
}