From 7a310505f50a7b8af879330e5450fb9a39ca9db8 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Fri, 25 Jul 2014 22:08:24 -0400 Subject: [PATCH] no need for retain --- source/screen.c | 14 +++++++------- source/workdir.c | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source/screen.c b/source/screen.c index 2402c44..5cc024d 100644 --- a/source/screen.c +++ b/source/screen.c @@ -33,7 +33,7 @@ void screen_init(void) { } void screen_deinit(void) { - fprintf(stderr, "deinitializing screen\n"); + fprintf(stderr, "deinitializing screen\n"); mem_release(Screen_List); } @@ -108,11 +108,11 @@ static void screen_place_windows(void) { //get the curent directory and copy it into a ref-counted memory block //return a pointer to the new block char* pwd(){ - char* dir = getcwd(NULL, 0); - char* rid = mem_allocate(sizeof(char)*(1+strlen(dir)), NULL); - strcpy(rid, dir); - free(dir); - return rid; + char* dir = getcwd(NULL, 0); + char* rid = mem_allocate(sizeof(char)*(1+strlen(dir)), NULL); + strcpy(rid, dir); + free(dir); + return rid; } static frame_t* screen_frame_new(void) { @@ -124,7 +124,7 @@ static frame_t* screen_frame_new(void) { } static void screen_frame_free(void* p_frame_ptr) { - fprintf(stderr, "freeing frame\n"); + fprintf(stderr, "freeing frame\n"); frame_t* p_frame = (frame_t*)p_frame_ptr; wclear(p_frame->p_win); wborder(p_frame->p_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '); diff --git a/source/workdir.c b/source/workdir.c index da8989c..1f58124 100644 --- a/source/workdir.c +++ b/source/workdir.c @@ -28,7 +28,6 @@ WorkDir_T* workdir_new(char* path){ WorkDir_T* wd = mem_allocate(sizeof(WorkDir_T), &workdir_free); wd->idx = 0; wd->path = path; - mem_retain(path); wd->vfiles = vec_new(0); workdir_ls(wd); wd->top_index = 0; -- 2.52.0