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) |
450 | 450 | gkrellm_debug(DEBUG_SYSDEP, |
451 | 451 | "No statistics dict found in storage driver, skipping disk '%s'\n", |
452 | 452 | disk->path); |
453 | | CFRelease(storage_driver_stats); |
454 | 453 | IOObjectRelease(storage_driver); |
455 | 454 | continue; |
456 | 455 | } |