projects
/
pazpar2-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:
d553058
)
Ensure show_range_start returns non-null
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 20 Mar 2013 14:43:26 +0000
(15:43 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 20 Mar 2013 14:43:26 +0000
(15:43 +0100)
if session is still locked. So that show_records properly unlocks
again.
src/session.c
patch
|
blob
|
history
diff --git
a/src/session.c
b/src/session.c
index
4603f2d
..
5e39968
100644
(file)
--- a/
src/session.c
+++ b/
src/session.c
@@
-1317,9
+1317,7
@@
struct record_cluster **show_range_start(struct session *se,
client_update_show_stat(rec->client, 1);
}
}
- if (*num > 0)
- recs =
- nmem_malloc(se->nmem, *num * sizeof(struct record_cluster *));
+ recs = nmem_malloc(se->nmem, (*num > 0 ? *num : 1) * sizeof(*recs));
for (i = 0; i < *num; i++)
{
struct record_cluster *r = reclist_read_record(se->reclist);