1
1
mirror of https://github.com/tstack/lnav.git synced 2024-09-11 13:05:51 +03:00

[valgrind] Fix some minor leaks

This commit is contained in:
Timothy Stack 2012-04-24 14:25:38 -07:00
parent a19faa885a
commit b0418957c6
3 changed files with 11 additions and 2 deletions

View File

@ -130,6 +130,13 @@ void grep_proc::start(void)
this->child_init();
this->child_loop();
exit(0);
}
void grep_proc::child_loop(void)
{
char outbuf[BUFSIZ * 2];
string line_value;
@ -196,8 +203,6 @@ void grep_proc::start(void)
fprintf(stdout, "%d\n", line - 1);
this->child_term();
}
exit(0);
}
void grep_proc::cleanup(void)

View File

@ -225,6 +225,8 @@ protected:
*/
void cleanup(void);
void child_loop(void);
virtual void child_init(void) { };
virtual void child_batch(void) { fflush(stdout); };

View File

@ -128,6 +128,8 @@ int main(int argc, char *argv[])
assert(wait(&status) == -1);
assert(errno == ECHILD);
}
free(code);
return retval;
}