Remove useless checks for NULL before freeing
[mesa.git] / src / gallium / auxiliary / util / u_debug_flush.c
index fdb248c23afcc06bd298d823b2a72e077862cfbc..cdefca2fb11b3b0c674f651a8e63011b10408f4c 100644 (file)
@@ -132,8 +132,7 @@ debug_flush_buf_reference(struct debug_flush_buf **dst,
    struct debug_flush_buf *fbuf = *dst;
 
    if (pipe_reference(&(*dst)->reference, &src->reference)) {
-      if (fbuf->map_frame)
-         FREE(fbuf->map_frame);
+      FREE(fbuf->map_frame);
 
       FREE(fbuf);
    }
@@ -146,8 +145,7 @@ debug_flush_item_destroy(struct debug_flush_item *item)
 {
    debug_flush_buf_reference(&item->fbuf, NULL);
 
-   if (item->ref_frame)
-      FREE(item->ref_frame);
+   FREE(item->ref_frame);
 
    FREE(item);
 }
@@ -263,10 +261,8 @@ debug_flush_unmap(struct debug_flush_buf *fbuf)
 
    fbuf->mapped_sync = FALSE;
    fbuf->mapped = FALSE;
-   if (fbuf->map_frame) {
-      FREE(fbuf->map_frame);
-      fbuf->map_frame = NULL;
-   }
+   FREE(fbuf->map_frame);
+   fbuf->map_frame = NULL;
    pipe_mutex_unlock(fbuf->mutex);
 }