projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f716a3b
)
Coverity: Forward NULL: CID 35
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Fri, 20 Jan 2012 17:49:52 +0000
(12:49 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Fri, 20 Jan 2012 17:49:52 +0000
(12:49 -0500)
* src/mem/ralloc.c (r_re_alloc): Make sure bloc is only
dereferenced if not NULL even in fatal crash case.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/mem/ralloc.c
patch
|
blob
|
history
diff --git
a/src/mem/ralloc.c
b/src/mem/ralloc.c
index
bd55ca3
..
7185afa
100644
(file)
--- a/
src/mem/ralloc.c
+++ b/
src/mem/ralloc.c
@@
-954,7
+954,7
@@
POINTER r_re_alloc(POINTER * ptr, size_t size)
if (bloc == NIL_BLOC)
abort();
- if (size < bloc->size) {
+
else
if (size < bloc->size) {
/* Wouldn't it be useful to actually resize the bloc here? */
/* I think so too, but not if it's too expensive... */
if ((bloc->size - MEM_ROUNDUP(size) >= page_size)