]> sourceware.org Git - dm.git/commitdiff
multilog_add_logging() lock additions/memory bug fix
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 4 May 2005 14:22:46 +0000 (14:22 +0000)
committerHeinz Mauelshagen <heinzm@redhat.com>
Wed, 4 May 2005 14:22:46 +0000 (14:22 +0000)
multilog/libmultilog.c

index 7089f4b2c4a51d5534e111870574a467761440b5..abebb704ad7e820c7d45694838ef6f14c58286f6 100644 (file)
@@ -171,8 +171,11 @@ int multilog_add_type(enum log_type type, struct log_data *data)
                logl->log = nop_log;
                break;
        case threaded_syslog:
-               if (!start_threaded_syslog(logl, data))
+               if (!start_threaded_syslog(logl, data)) {
+                       unlock_mutex();
+                       free(logl);
                        return 0;
+               }
 
                break;
        case custom:
This page took 0.02211 seconds and 5 git commands to generate.