in tog blame, set corret pointer to NULL after object close
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/got/Makefile b/got/Makefile
index 883c138..231812e 100644
--- a/got/Makefile
+++ b/got/Makefile
@@ -18,7 +18,7 @@ DEBUG = -O0 -g
.endif
CFLAGS += -Werror -Wall -Wstrict-prototypes -Wunused-variable
#CFLAGS += -DGOT_PACK_NO_MMAP
-#CFLAGS += -DGOT_NO_OBJ_CACHE
+CFLAGS += -DGOT_NO_OBJ_CACHE
# For now, default to installing binary in ~/bin
GROUP!=id -g -n
diff --git a/tog/Makefile b/tog/Makefile
index 922dbcd..b964696 100644
--- a/tog/Makefile
+++ b/tog/Makefile
@@ -18,7 +18,7 @@ DEBUG = -O0 -g
.endif
CFLAGS += -Werror -Wall -Wstrict-prototypes -Wunused-variable
#CFLAGS += -DGOT_PACK_NO_MMAP
-#CFLAGS += -DGOT_NO_OBJ_CACHE
+CFLAGS += -DGOT_NO_OBJ_CACHE
# For now, default to installing binary in ~/bin
GROUP!=id -g -n
diff --git a/tog/tog.c b/tog/tog.c
index e5ddd90..74bb49f 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1599,7 +1599,7 @@ show_blame_view(const char *path, struct got_object_id *commit_id,
obj = NULL;
if (pobj) {
got_object_close(pobj);
- obj = NULL;
+ pobj = NULL;
}
if (id == NULL) {
err = got_error_from_errno();