Commit 14437fb1f1eaee02d6eadf828de2e8fb8109c8a2

Stefan Sperling 2018-07-13T10:04:13

in tog blame, set corret pointer to NULL after object close

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();