#35 nsd/driver.c:8229: error: Resource Leak resource acquired by call to `open()` at line 8222, column 14 is not released after line 8229, column 13. nsd/driver.c:8168:1: start of procedure AsyncLogfileOpenObjCmd() 8166. *---------------------------------------------------------------------- 8167. */ 8168. static int ^ 8169. AsyncLogfileOpenObjCmd(ClientData UNUSED(clientData), Tcl_Interp *interp, int objc, Tcl_Obj *const* objv) 8170. { nsd/driver.c:8171:5: 8169. AsyncLogfileOpenObjCmd(ClientData UNUSED(clientData), Tcl_Interp *interp, int objc, Tcl_Obj *const* objv) 8170. { 8171. int result = TCL_OK; ^ 8172. unsigned int flags = O_APPEND; 8173. char *fileNameString; nsd/driver.c:8172:5: 8170. { 8171. int result = TCL_OK; 8172. unsigned int flags = O_APPEND; ^ 8173. char *fileNameString; 8174. Tcl_Obj *flagsObj = NULL; nsd/driver.c:8174:5: 8172. unsigned int flags = O_APPEND; 8173. char *fileNameString; 8174. Tcl_Obj *flagsObj = NULL; ^ 8175. Ns_ObjvTable flagTable[] = { 8176. {"APPEND", O_APPEND}, nsd/driver.c:8175:5: 8173. char *fileNameString; 8174. Tcl_Obj *flagsObj = NULL; 8175. Ns_ObjvTable flagTable[] = { ^ 8176. {"APPEND", O_APPEND}, 8177. {"EXCL", O_EXCL}, nsd/driver.c:8187:5: 8185. {NULL, 0u} 8186. }; 8187. Ns_ObjvSpec args[] = { ^ 8188. {"filename", Ns_ObjvString, &fileNameString, NULL}, 8189. {"?flags", Ns_ObjvObj, &flagsObj, NULL}, nsd/driver.c:8194:9: Condition is false 8192. }; 8193. 8194. if (unlikely(Ns_ParseObjv(NULL, args, interp, 2, objc, objv) != NS_OK)) { ^ 8195. result = TCL_ERROR; 8196. nsd/driver.c:8194:9: Taking false branch 8192. }; 8193. 8194. if (unlikely(Ns_ParseObjv(NULL, args, interp, 2, objc, objv) != NS_OK)) { ^ 8195. result = TCL_ERROR; 8196. nsd/driver.c:8197:16: Taking false branch 8195. result = TCL_ERROR; 8196. 8197. } else if (flagsObj != NULL) { ^ 8198. Tcl_Obj **ov; 8199. int oc; nsd/driver.c:8219:9: Taking true branch 8217. } 8218. 8219. if (result == TCL_OK) { ^ 8220. int fd; 8221. nsd/driver.c:8222:9: 8220. int fd; 8221. 8222. fd = ns_open(fileNameString, (int)(O_CREAT | O_WRONLY | O_CLOEXEC | flags), 0644); ^ 8223. 8224. if (unlikely(fd == NS_INVALID_FD)) { nsd/driver.c:8224:13: Condition is false 8222. fd = ns_open(fileNameString, (int)(O_CREAT | O_WRONLY | O_CLOEXEC | flags), 0644); 8223. 8224. if (unlikely(fd == NS_INVALID_FD)) { ^ 8225. Ns_TclPrintfResult(interp, "could not open file '%s': %s", 8226. fileNameString, Tcl_PosixError(interp)); nsd/driver.c:8224:13: Taking false branch 8222. fd = ns_open(fileNameString, (int)(O_CREAT | O_WRONLY | O_CLOEXEC | flags), 0644); 8223. 8224. if (unlikely(fd == NS_INVALID_FD)) { ^ 8225. Ns_TclPrintfResult(interp, "could not open file '%s': %s", 8226. fileNameString, Tcl_PosixError(interp)); nsd/driver.c:8229:13: Skipping Tcl_SetObjResult(): method has no implementation 8227. result = TCL_ERROR; 8228. } else { 8229. Tcl_SetObjResult(interp, Tcl_NewIntObj(fd)); ^ 8230. } 8231. }