projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code calls xfree() instead of free().
[idzebra-moved-to-github.git]
/
index
/
trunc.c
diff --git
a/index/trunc.c
b/index/trunc.c
index
531a9c6
..
56ad3fb
100644
(file)
--- a/
index/trunc.c
+++ b/
index/trunc.c
@@
-1,10
+1,16
@@
/*
/*
- * Copyright (C) 1994-1996, Index Data I/S
+ * Copyright (C) 1994-1997, Index Data I/S
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: trunc.c,v $
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: trunc.c,v $
- * Revision 1.6 1997-09-22 12:39:06 adam
+ * Revision 1.8 1997-10-31 12:34:27 adam
+ * Bug fix: memory leak.
+ *
+ * Revision 1.7 1997/09/29 09:07:29 adam
+ * Minor change.
+ *
+ * Revision 1.6 1997/09/22 12:39:06 adam
* Added get_pos method for the ranked result sets.
*
* Revision 1.5 1997/09/17 12:19:17 adam
* Added get_pos method for the ranked result sets.
*
* Revision 1.5 1997/09/17 12:19:17 adam
@@
-103,9
+109,9
@@
static void heap_insert (struct trunc_info *ti, const char *buf, int indx)
}
}
}
}
-static
-struct trunc_info *heap_init (int size, int key_size,
- int (*cmp)(const void *p1, const void *p2))
+static struct trunc_info *heap_init (int size, int key_size,
+ int (*cmp)(const void *p1,
+ const void *p2))
{
struct trunc_info *ti = xmalloc (sizeof(*ti));
int i;
{
struct trunc_info *ti = xmalloc (sizeof(*ti));
int i;
@@
-135,6
+141,7
@@
static void heap_close (struct trunc_info *ti)
xfree (ti->heap);
xfree (ti->swapbuf);
xfree (ti->tmpbuf);
xfree (ti->heap);
xfree (ti->swapbuf);
xfree (ti->tmpbuf);
+ xfree (ti->buf);
xfree (ti);
}
xfree (ti);
}