Ticket #29565: 207a0519ac73290ba65b6e5f7446549a2a66f5d2.patch

File 207a0519ac73290ba65b6e5f7446549a2a66f5d2.patch, 794 bytes (added by stefan+macports@…, 13 years ago)

Do not free nullpointer in Darwin disk reading

  • src/sysdeps/darwin.c

    From 207a0519ac73290ba65b6e5f7446549a2a66f5d2 Mon Sep 17 00:00:00 2001
    From: Stefan Gehn
    Date: Mon, 05 Dec 2011 16:12:28 +0000
    Subject: Do not free nullpointer in Darwin disk reading
    
    Calling CFRelease() on a NULL value is wrong and causes crashes.
    This should fix MacPorts ticket #29565.
    ---
    diff --git a/src/sysdeps/darwin.c b/src/sysdeps/darwin.c
    index c36788c..f506a29 100644
    a b gkrellm_sys_disk_read_data(void) 
    450450            gkrellm_debug(DEBUG_SYSDEP,
    451451                "No statistics dict found in storage driver, skipping disk '%s'\n",
    452452                disk->path);
    453             CFRelease(storage_driver_stats);
    454453            IOObjectRelease(storage_driver);
    455454            continue;
    456455        }