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:
parent
e0c3d4250a
commit
5210a06d15
2 changed files with 3 additions and 1 deletions
2
Makefile
2
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*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue