Neil Horman 717c094
diff -up ./server.c.orig ./server.c
Neil Horman 717c094
--- ./server.c.orig	2013-12-03 13:09:47.503514123 -0500
Neil Horman 717c094
+++ ./server.c	2013-12-03 13:09:42.419477970 -0500
Neil Horman 717c094
@@ -102,9 +102,8 @@ get_dir_from_ip (guint32 ip, gboolean cr
Neil Horman 717c094
       res = mkdir(dir->path, S_IRWXU);
Neil Horman 717c094
       if (res)
Neil Horman 717c094
 	{
Neil Horman 717c094
-	  char *msg = g_strdup_printf ("Error making crashdump directory %s", dir->path);
Neil Horman 717c094
-	  syslog (LOG_ERR, msg);
Neil Horman 717c094
-	  g_free (msg);
Neil Horman 717c094
+	  syslog (LOG_ERR, "Error making crashdump directory %s",
Neil Horman 717c094
+		  dir->path);
Neil Horman 717c094
 	  g_free (dir->path);
Neil Horman 717c094
 	  g_free (dir);
Neil Horman 717c094
 	  return NULL;
Neil Horman 717c094
@@ -245,11 +244,10 @@ handle_new_client (guint32 ip, guint16 p
Neil Horman 717c094
       if (!just_reboot &&
Neil Horman 717c094
 	  (g_hash_table_size (clients) > config.max_concurrent_dumps))
Neil Horman 717c094
 	{
Neil Horman 717c094
-	  char *msg = g_strdup_printf ("Too many concurrent netdumps, ignoring dump request from %d.%d.%d.%d\n",
Neil Horman 717c094
-				       (ip >> 24) & 0xff, (ip >> 16) & 0xff,
Neil Horman 717c094
-				       (ip >> 8) & 0xff, (ip >> 0) & 0xff);
Neil Horman 717c094
-	  syslog (LOG_WARNING, msg);
Neil Horman 717c094
-	  g_free (msg);
Neil Horman 717c094
+	  syslog (LOG_WARNING, "Too many concurrent netdumps, ignoring dump "
Neil Horman 717c094
+				"from %d.%d.%d.%d\n",
Neil Horman 717c094
+				(ip >> 24) & 0xff, (ip >> 16) & 0xff,
Neil Horman 717c094
+				(ip >> 8) & 0xff, (ip >> 0) & 0xff);
Neil Horman 717c094
 	  just_reboot = TRUE;
Neil Horman 717c094
 	}
Neil Horman 717c094
 
Neil Horman 717c094
@@ -490,10 +488,8 @@ main (int argc, char *argv[])
Neil Horman 717c094
 	    (struct sockaddr *) &saddr,
Neil Horman 717c094
 	    sizeof (saddr)) < 0)
Neil Horman 717c094
     {
Neil Horman 717c094
-      str = g_strdup_printf ("Couldn't bind master socket to %s:%d",
Neil Horman 717c094
-                        !config.addr ? "any" : config.addr, config.port);
Neil Horman 717c094
-      syslog (LOG_ERR, str);
Neil Horman 717c094
-      g_free (str);
Neil Horman 717c094
+      syslog (LOG_ERR, "Couldn't bind master socket to %s:%d",
Neil Horman 717c094
+			!config.addr ? "any" : config.addr, config.port);
Neil Horman 717c094
       exit (1);
Neil Horman 717c094
     }
Neil Horman 717c094