summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-03-19 11:05:51 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-03-19 18:55:05 -1000
commit6e15d6c6f3bdb5750bb08c6db770c4bfc5eebbaf (patch)
tree1bb458a30d2c0672eca305157488decd9ab91918 /isys
parent44910a2fd019b1a0b06166ceaadc556e05ed2971 (diff)
downloadanaconda-6e15d6c6f3bdb5750bb08c6db770c4bfc5eebbaf.tar.gz
anaconda-6e15d6c6f3bdb5750bb08c6db770c4bfc5eebbaf.tar.xz
anaconda-6e15d6c6f3bdb5750bb08c6db770c4bfc5eebbaf.zip
Avoid SIGSEGV in doPwMount() when NULL is last parameter (#491192)
If NULL is given as the last parameter to doPwMount(), do not try to dereference it.
Diffstat (limited to 'isys')
-rw-r--r--isys/imount.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/isys/imount.c b/isys/imount.c
index 614e67ee6..fd51fdefa 100644
--- a/isys/imount.c
+++ b/isys/imount.c
@@ -146,9 +146,11 @@ int doPwMount(char *dev, char *where, char *fs, char *options, char **err) {
close(pipefd[1]);
- if (*err != NULL) {
- rc = readFD(pipefd[0], err);
- rc = write(programLogFD, *err, 4096);
+ if (err != NULL) {
+ if (*err != NULL) {
+ rc = readFD(pipefd[0], err);
+ rc = write(programLogFD, *err, 4096);
+ }
}
close(pipefd[0]);