Add check for malloc failing
authorWilliam Douglas <william.douglas@intel.com>
Mon, 21 May 2012 17:58:32 +0000 (10:58 -0700)
committerWilliam Douglas <william.douglas@intel.com>
Mon, 21 May 2012 17:58:32 +0000 (10:58 -0700)
Signed-off-by: William Douglas <william.douglas@intel.com>
src/submit.c

index d5ceaeb..e18d0a5 100644 (file)
@@ -65,6 +65,8 @@ void queue_backtrace(struct oops *oops)
                return;
 
        new = malloc(sizeof(struct oops));
+       if (!new)
+               return;
        pthread_mutex_lock(&queued_bt_mtx);
        new->next = queued_backtraces;
        if (oops->application)