diff --git a/inotifyrun.c b/inotifyrun.c index 16a6102..9b70fd6 100644 --- a/inotifyrun.c +++ b/inotifyrun.c @@ -56,7 +56,7 @@ int main(int argc, char **argv) { // Get array of files and commands libcatch_behavior = 0; struct fcmd_pair *assocs = (struct fcmd_pair *)(argv + 1); - struct fcmdwatcher_pair *assocs_watches = malloc((sizeof(struct fcmdwatcher_pair) * ((argc - 1) / 2)) + 1); + struct fcmdwatcher_pair *assocs_watches; struct fcmdwatcher_pair *watcherpair_ptr; CATCH(assocs_watches = malloc((sizeof(struct fcmdwatcher_pair) * ((argc - 1) / 2)) + 1)); // Initlialise inotify further while checking if all files are actual files