diff --git a/Makefile b/Makefile index 18e0c14..0dce24f 100644 --- a/Makefile +++ b/Makefile @@ -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* diff --git a/eyefi-unix.c b/eyefi-unix.c index e674089..b31d9ed 100755 --- a/eyefi-unix.c +++ b/eyefi-unix.c @@ -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; }