valgrind fixes

valgrind really does not like -static.  It throws thousands of
false positives.  So, make the build non-static, then fix up
a couple of valgrind-detected leaks.
This commit is contained in:
Dave Hansen 2011-08-08 12:48:40 -07:00
parent e0c3d4250a
commit 5210a06d15
2 changed files with 3 additions and 1 deletions

View file

@ -18,7 +18,7 @@ ifeq ($(PLATFORM),FreeBSD)
endif
eyefi-config: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -static -o $@
$(CC) $(CFLAGS) $(OBJS) -o $@
clean:
rm eyefi-config core $(OBJS) cscope*

View file

@ -267,6 +267,7 @@ int print_log(void)
total_bytes = get_log_into(resbuf);
if (total_bytes < 0) {
debug_printf(1, "%s() error: %d\n", __func__, total_bytes);
free(resbuf);
return total_bytes;
}
// The last byte *should* be a null, and the
@ -297,6 +298,7 @@ int print_log(void)
}
}
*/
free(resbuf);
return 0;
}