summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-08-09 19:09:41 +0000
committerChris Lumens <clumens@redhat.com>2006-08-09 19:09:41 +0000
commit18cc4d6739ab1ce240e6ea08145de3c897ea80fe (patch)
treefb32ec48c20bd156d988b11112f194c6aa1ee83c /loader2
parent66026c2b566f645289ff07d048992bb11e86dd47 (diff)
downloadanaconda-18cc4d6739ab1ce240e6ea08145de3c897ea80fe.tar.gz
anaconda-18cc4d6739ab1ce240e6ea08145de3c897ea80fe.tar.xz
anaconda-18cc4d6739ab1ce240e6ea08145de3c897ea80fe.zip
Don't try to strdup nothing (#196334).
Diffstat (limited to 'loader2')
-rw-r--r--loader2/net.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/loader2/net.c b/loader2/net.c
index ff6636628..b5a2d0ac3 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -556,8 +556,12 @@ int readNetConfig(char * device, struct networkDeviceConfig * cfg,
logMessage(INFO, "%s is a wireless adapter", device);
if (getWirelessConfig(cfg, device) == LOADER_BACK)
return LOADER_BACK;
- newCfg.essid = strdup(cfg->essid);
- newCfg.wepkey = strdup(cfg->wepkey);
+
+ if (cfg->essid != NULL)
+ newCfg.essid = strdup(cfg->essid);
+
+ if (cfg->wepkey != NULL)
+ newCfg.wepkey = strdup(cfg->wepkey);
} else {
logMessage(INFO, "%s is not a wireless adapter", device);
}