summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-12-17 14:52:49 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-12-17 17:40:21 -1000
commitcb17becc8ddf0176389b87c80c35fa250954ba16 (patch)
tree02060d704265d60639fda4faa050d0ac82fa1561
parent74aaab729f04b6591860f8f8d3dee1a558e4f1ff (diff)
downloadanaconda-cb17becc8ddf0176389b87c80c35fa250954ba16.tar.gz
anaconda-cb17becc8ddf0176389b87c80c35fa250954ba16.tar.xz
anaconda-cb17becc8ddf0176389b87c80c35fa250954ba16.zip
Check error from asprintf() correctly for dhcpclass handling.
If asprintf() errors, it returns -1. Check for that correctly and return 20 on error. [rawhide]
-rw-r--r--loader/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/loader/net.c b/loader/net.c
index edb863695..eef0234c1 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1172,7 +1172,7 @@ int writeEnabledNetInfo(iface_t *iface) {
iface->vendorclass = "anaconda";
} else {
if (asprintf(&iface->vendorclass, "anaconda-%s %s %s",
- kv.sysname, kv.release, kv.machine)) {
+ kv.sysname, kv.release, kv.machine) == -1 ) {
return 20;
}
}