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:
parent
a19faa885a
commit
b0418957c6
@ -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)
|
||||
|
@ -225,6 +225,8 @@ protected:
|
||||
*/
|
||||
void cleanup(void);
|
||||
|
||||
void child_loop(void);
|
||||
|
||||
virtual void child_init(void) { };
|
||||
|
||||
virtual void child_batch(void) { fflush(stdout); };
|
||||
|
@ -128,6 +128,8 @@ int main(int argc, char *argv[])
|
||||
assert(wait(&status) == -1);
|
||||
assert(errno == ECHILD);
|
||||
}
|
||||
|
||||
free(code);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user