summaryrefslogtreecommitdiff
path: root/jcnf/jcnf.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:38:41 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:38:41 +0100
commitba627dd9ecb578e9852c7b9cce67ec63199d1acf (patch)
tree27c4258311ca8c8ed7ff67a8a0bc7280e8fcae79 /jcnf/jcnf.c
parent69aec3b712232e93600ecd741269fed1f90b412a (diff)
parent3abb40d43649adb3807180692d8579c405524675 (diff)
Merge branch 'release/2.0.0+repack-1'2.0.0+repack-1
Diffstat (limited to 'jcnf/jcnf.c')
-rwxr-xr-x[-rw-r--r--]jcnf/jcnf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/jcnf/jcnf.c b/jcnf/jcnf.c
index 799be7c..273796e 100644..100755
--- a/jcnf/jcnf.c
+++ b/jcnf/jcnf.c
@@ -413,6 +413,7 @@ static jc_error jcnf_delete_key(
if ((ix+1) < p->nkeys) {
memmove(p->keys+ix, p->keys+ix+1,sizeof(jc_key *) * p->nkeys-ix-1);
}
+ free(p->keys[p->nkeys-1]);
p->nkeys--;
p->modified = 1;
@@ -607,6 +608,7 @@ static int jcnf_yajl_start_map(void *ctx) {
return 1;
}
+/* Callback from yajl */
static int jcnf_yajl_map_key(void *ctx, const unsigned char * stringVal,
size_t stringLen) {
jcnf *p = (jcnf *)ctx;
@@ -650,6 +652,8 @@ static int jcnf_yajl_end_map(void *ctx) {
/* End of map without start of map */
return 0;
}
+ if (p->recds[p->nrecd-1].key != NULL)
+ free(p->recds[p->nrecd-1].key);
p->nrecd--;
#ifdef NEVER