fix destruction to free all memory
[ust.git] / ustd / ustd.c
index f3285f58ba534d8c82c7f80677f5eba5f32de85d..4db550222407ba7d0773aa8b15e1b33cda777de2 100644 (file)
@@ -674,6 +674,11 @@ int start_ustd(int fd)
                PERROR("sigaction");
                return 1;
        }
+       result = sigaction(SIGINT, &sa, NULL);
+       if(result == -1) {
+               PERROR("sigaction");
+               return 1;
+       }
 
        result = ustcomm_init_ustd(&ustd, sock_path);
        if(result == -1) {
@@ -756,6 +761,9 @@ int start_ustd(int fd)
                                free_bufname:
                                free(bufname);
                        }
+                       else {
+                               WARN("unknown command: %s", recvbuf);
+                       }
 
                        free(recvbuf);
                }
@@ -772,6 +780,8 @@ int start_ustd(int fd)
                }
        }
 
+       ustcomm_fini_ustd(&ustd);
+
        return 0;
 }
 
This page took 0.02402 seconds and 4 git commands to generate.