summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a30f9f5)
* Not closing will use up all file descriptors over time.
if (fd == NULL)
return NULL;
if (fd == NULL)
return NULL;
- if (fgets(line, sizeof(line)-1, fd) == NULL)
+ if (fgets(line, sizeof(line)-1, fd) == NULL) {
+ fclose(fd);
fclose(fd);
return smprintf("%s", line);
fclose(fd);
return smprintf("%s", line);