Merge branch 'upstream' into tizen
[platform/upstream/libunwind.git] / src / coredump / _UCD_create.c
index 62f6ee0..5d7219f 100644 (file)
@@ -238,6 +238,11 @@ _UCD_create(const char *filename)
 
             ui->n_threads = n_threads;
             ui->threads = malloc(sizeof (void *) * n_threads);
+            if (!ui->threads)
+              {
+                Debug(0, "Allocation failed");
+                goto err;
+              }
 
             n_threads = 0;
             note_hdr = (Elf32_Nhdr *)ui->note_phdr;