Code

Attempting to fix a reported segfault (1055054)
authorMatthew Kent <mattkent@users.sourceforge.net>
Wed, 24 Nov 2004 04:35:40 +0000 (04:35 +0000)
committerMatthew Kent <mattkent@users.sourceforge.net>
Wed, 24 Nov 2004 04:35:40 +0000 (04:35 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@932 f882894a-f735-0410-b71e-b25c423dba1c

plugins/check_nwstat.c

index 765a4fb6578a1963f8ea8eba108947c55be3e8b4..46bc7e90816bba4729866034b8b71b228782889d 100644 (file)
@@ -141,13 +141,13 @@ main(int argc, char **argv) {
                if (result!=STATE_OK)
                        return result;
                if (!strcmp(recv_buffer,"-1\n"))
-                       asprintf (&netware_version, "%s", "");
+                       netware_version = strdup("");
                else {
                        recv_buffer[strlen(recv_buffer)-1]=0;
                        asprintf (&netware_version,_("NetWare %s: "),recv_buffer);
                }
        } else
-               asprintf (&netware_version, "%s", "");
+               netware_version = strdup("");
 
 
        /* check CPU load */