2016-03-29 1:58 GMT+08:00 Junio C Hamano :
> Hui Yiqun writes:
>
>> According to strbuf.h, strbuf_detach is the sole supported method
>> to unwrap a memory buffer from its strbuf shell.
>> ...
>> diff --git a/path.c b/path.c
>> index 969b494..9801617 100644
>> --- a/path.c
>> +++ b/path.c
>> @@ -6
Hui Yiqun writes:
> According to strbuf.h, strbuf_detach is the sole supported method
> to unwrap a memory buffer from its strbuf shell.
> ...
> diff --git a/path.c b/path.c
> index 969b494..9801617 100644
> --- a/path.c
> +++ b/path.c
> @@ -625,6 +625,7 @@ const char *enter_repo(const char *path
Sorry, I sent the patch repeatedly to fix a wrongly indent with space.
2016-03-28 23:57 GMT+08:00 Hui Yiqun :
> According to strbuf.h, strbuf_detach is the sole supported method
> to unwrap a memory buffer from its strbuf shell.
>
> So we should not return the pointer of strbuf.buf directly.
>
> W
According to strbuf.h, strbuf_detach is the sole supported method
to unwrap a memory buffer from its strbuf shell.
So we should not return the pointer of strbuf.buf directly.
What's more, some memory leakages are solved.
---
path.c | 15 ++-
1 file changed, 10 insertions(+), 5 deleti
4 matches
Mail list logo