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
(from parent 1:
f67c47b
)
Fix a logic error leading to unlink(NULL) call, oops.
author
Panu Matilainen
<pmatilai@redhat.com>
Mon, 30 May 2011 12:54:16 +0000
(15:54 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Mon, 30 May 2011 12:54:16 +0000
(15:54 +0300)
- If writing the scriptlet to a file fails, its possible to
end up with non-NULL script but with NULL fn and kaboom in unlink()
lib/rpmscript.c
patch
|
blob
|
history
diff --git
a/lib/rpmscript.c
b/lib/rpmscript.c
index
6580a52
..
1d5ed4e
100644
(file)
--- a/
lib/rpmscript.c
+++ b/
lib/rpmscript.c
@@
-280,7
+280,7
@@
exit:
if (out)
Fclose(out); /* XXX dup'd STDOUT_FILENO */
- if (
script
) {
+ if (
fn
) {
if (!rpmIsDebug())
unlink(fn);
free(fn);