]> git.imager.perl.org - imager.git/blobdiff - mutexpthr.c
RT#128481: fix handling of GIF files with no images
[imager.git] / mutexpthr.c
index 709f02fd62c73cf0aaf641f2176a5e9be7713be6..67ed2c944646e0cb6fc57618057cb693169b02f9 100644 (file)
@@ -17,7 +17,9 @@ i_mutex_t
 i_mutex_new(void) {
   i_mutex_t m;
 
 i_mutex_new(void) {
   i_mutex_t m;
 
-  m = mymalloc(sizeof(*m));
+  m = malloc(sizeof(*m));
+  if (!m)
+    i_fatal(3, "Cannot allocate mutex object");
   if (pthread_mutex_init(&m->mutex, NULL) != 0) {
     i_fatal(3, "Error initializing mutex %d", errno);
   }
   if (pthread_mutex_init(&m->mutex, NULL) != 0) {
     i_fatal(3, "Error initializing mutex %d", errno);
   }
@@ -28,7 +30,7 @@ i_mutex_new(void) {
 void
 i_mutex_destroy(i_mutex_t m) {
   pthread_mutex_destroy(&(m->mutex));
 void
 i_mutex_destroy(i_mutex_t m) {
   pthread_mutex_destroy(&(m->mutex));
-  myfree(m);
+  free(m);
 }
 
 void
 }
 
 void