]> git.notmuchmail.org Git - notmuch/commitdiff
json_quote_chararray: Always return a newly talloced array
authorAnthony <aj@erisian.com.au>
Tue, 20 Apr 2010 15:55:31 +0000 (08:55 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 20 Apr 2010 15:55:31 +0000 (08:55 -0700)
The special case for len==0 was wrong---the normal code path is to
talloc to get a newly allocated, editable string, that might be
talloc_free'd later. It makes more sense just to let the len==0
behaviour fall through into the normal case code.

Reviewed-by: Carl Worth <cworth@cworth.org>
This results in the same value being returned, but with the proper
memory handling.


No differences found