[libgsf] Avoid (unlikely) NULL pointer dereference
- From: J.H.M. Dassen (Ray) <jdassen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] Avoid (unlikely) NULL pointer dereference
- Date: Sat, 5 Jan 2013 19:37:05 +0000 (UTC)
commit 01793f3c5bbb88f78d510762652b9343ebdf04d7
Author: J.H.M. Dassen (Ray) <jdassen debian org>
Date: Sat Jan 5 20:36:57 2013 +0100
Avoid (unlikely) NULL pointer dereference
gsf/gsf-shared-memory.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gsf/gsf-shared-memory.c b/gsf/gsf-shared-memory.c
index 9492f8c..c098019 100644
--- a/gsf/gsf-shared-memory.c
+++ b/gsf/gsf-shared-memory.c
@@ -59,6 +59,7 @@ gsf_shared_memory_mmapped_new (void *buf, gsf_off_t size)
return NULL;
} else {
GsfSharedMemory *mem = gsf_shared_memory_new (buf, size, FALSE);
+ if (G_UNLIKELY (NULL == mem)) return NULL;
mem->needs_unmap = TRUE;
return mem;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]