aboutsummaryrefslogtreecommitdiff
path: root/src/triplet.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-12-23 00:54:27 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2012-12-23 00:54:27 +0200
commit0077bc419d34a0341f978fc0e2d5cba8d35d4b28 (patch)
treef5cb831a306e99dce9a8c5af1b4be55cf7dbb658 /src/triplet.c
parent67a64a6a7809c183516740696e15ab88f82d7ef0 (diff)
downloadwydawca-0077bc419d34a0341f978fc0e2d5cba8d35d4b28.tar.gz
wydawca-0077bc419d34a0341f978fc0e2d5cba8d35d4b28.tar.bz2
Fix memory leaks, provide config statements for disabling inotify.
* src/config.c: New statement "inotify" (global and spool-specific). * src/gpg.c (gpg_verify_signature): Free key when no longer needed. (verify_directive_signature): Fix memory leak. * src/job.c (job_queue_runner): Free the unlinked job. * src/triplet.c (triplet_lookup): Free key.name. * src/verify.c (fill_project_name): Return immediately if trp->blurb is not null. * src/watcher.c (create_watcher): Ignore spool if its inotify_enable is false. (watcher_init): Return immediately if inotify_enable is false. * src/wydawca.c (inotify_enable): New global. * src/wydawca.h: Likewise.
Diffstat (limited to 'src/triplet.c')
-rw-r--r--src/triplet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/triplet.c b/src/triplet.c
index 05b7536..aa74de0 100644
--- a/src/triplet.c
+++ b/src/triplet.c
@@ -124,15 +124,16 @@ triplet_lookup (struct spool *spool, const char *name)
parse_file_name (name, &finfo);
key.name = grecs_malloc (finfo.root_len + 1);
memcpy (key.name, finfo.name, finfo.root_len);
key.name[finfo.root_len] = 0;
key.spool = spool;
+ file_info_cleanup (&finfo);
ret = grecs_symtab_lookup_or_install (triplet_table, &key, NULL);
- file_info_cleanup (&finfo);
+ free (key.name);
return ret;
}
/* Return true if any part of the triplet TRP was modified more than
TTL seconds ago */

Return to:

Send suggestions and report system problems to the System administrator.