diff options
Diffstat (limited to 'web/web_misc.c')
| -rw-r--r-- | web/web_misc.c | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/web/web_misc.c b/web/web_misc.c index a754f9e..dcb386e 100644 --- a/web/web_misc.c +++ b/web/web_misc.c @@ -27,3 +27,11 @@ char *bufstr_flush(bufstr *b)  	b->fl = b->buf;  	return b->fl;  } + +void bufstr_clear(bufstr *b) +{ +	if (b->buf != b->fl) +		free(b->buf); +	free(b->fl); +	b->fl = b->buf = NULL; +} | 
