Check error return from vasprintf: string is undefined on error
[moonshot.git] / moonshot / mech_eap / display_status.c
index b3cf2f9..584eac9 100644 (file)
@@ -132,6 +132,8 @@ gssEapSaveStatusInfo(OM_uint32 minor, const char *format, ...)
     if (format != NULL) {
         va_start(ap, format);
         n = vasprintf(&s, format, ap);
+        if (n == -1)
+            s = NULL;
         va_end(ap);
     }