eliminate gratuitious comment change in source code
[debian/amanda] / amandad-src / amandad.c
index 04774345284227e102734fab93354909e8435c6f..11009d854ef405fbbfd443427c61e2bfba83e9ab 100644 (file)
@@ -244,6 +244,11 @@ main(
        /*NOTREACHED*/
     }
 
+    if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
+       printf("amandad-%s\n", VERSION);
+       return (0);
+    }
+
     /* Don't die when child closes pipe */
     signal(SIGPIPE, SIG_IGN);
 
@@ -559,6 +564,7 @@ protocol_accept(
     char *service_path = NULL;
     GSList *errlist = NULL;
     int i;
+    char *peer_name;
 
     pkt_out.body = NULL;
 
@@ -595,7 +601,9 @@ protocol_accept(
        return;
     }
 
-    g_debug("authenticated peer name is '%s'", security_get_authenticated_peer_name(handle));
+    peer_name = security_get_authenticated_peer_name(handle);
+    g_debug("authenticated peer name is '%s'", peer_name);
+    amfree(peer_name);
 
     /*
      * If pkt is NULL, then there was a problem with the new connection.