From: Michael D. Lowis Date: Sat, 26 Jul 2014 02:08:24 +0000 (-0400) Subject: no need for retain X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7a310505f50a7b8af879330e5450fb9a39ca9db8;p=archive%2Fafm.git no need for retain --- 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;