소스 검색

Only free() after xstrdup()

master
sin 10 년 전
부모
커밋
35f3b250bb
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -2
      noice.c

+ 1
- 2
noice.c 파일 보기

@@ -128,12 +128,11 @@ xdirname(const char *path)
* original string if we lose track of it. */
tmp = xstrdup(path);
p = dirname(tmp);
free(tmp);
if (p == NULL)
printerr(1, "dirname");

/* Make sure this is a malloc(3)-ed string */
p = xstrdup(p);
free(tmp);
return p;
}



불러오는 중...
취소
저장