projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c1c75fd
)
Function xfree_f checks for NULL pointer.
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 3 Jul 1996 13:21:36 +0000
(13:21 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 3 Jul 1996 13:21:36 +0000
(13:21 +0000)
util/xmalloc.c
patch
|
blob
|
history
diff --git
a/util/xmalloc.c
b/util/xmalloc.c
index
5d61564
..
ce7852a
100644
(file)
--- a/
util/xmalloc.c
+++ b/
util/xmalloc.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: xmalloc.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: xmalloc.c,v $
- * Revision 1.3 1995-12-05 15:08:44 adam
+ * Revision 1.4 1996-07-03 13:21:36 adam
+ * Function xfree_f checks for NULL pointer.
+ *
+ * Revision 1.3 1995/12/05 15:08:44 adam
* Fixed verbose of xrealloc.
*
* Revision 1.2 1995/12/05 11:08:37 adam
* Fixed verbose of xrealloc.
*
* Revision 1.2 1995/12/05 11:08:37 adam
@@
-98,6
+101,8
@@
char *xstrdup_f (const char *s, char *file, int line)
void xfree_f(void *p, char *file, int line)
{
void xfree_f(void *p, char *file, int line)
{
+ if (!p)
+ return ;
#ifdef TRACE_XMALLOC
if (p)
fprintf(stderr, "%s:%d: xfree %p\n", file, line, p);
#ifdef TRACE_XMALLOC
if (p)
fprintf(stderr, "%s:%d: xfree %p\n", file, line, p);