]> git.ozlabs.org Git - ccan/commit
small fix for ccan/take/take.c
authorDmitry Petukhov <dp@simplexum.com>
Sun, 4 Nov 2018 14:58:04 +0000 (19:58 +0500)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 5 Nov 2018 02:44:52 +0000 (13:14 +1030)
commit440efa555b08324386fa15488cefaed68a791d6e
tree78b1c0f6f522ac13e2cc0cbf913380f7dbffb849
parentc656dceb3f04c2e3da7af40824c97eff5119a0b9
small fix for ccan/take/take.c

Hello.

I've decided to take a look at c-lighting code, because we might
consider using it in the future.

I found a small problem in ccan/take/take.c that only concerns code
that runs with CCAN_TAKE_DEBUG set (DEVELOPER=1 for c-lighting).

It is a small issue, but I decided to notify you as the author of the
code, anyway.

the issue is:
  in take_() function, potential failure of realloc for labelarr is not
  handled.

I attached a diff with a fix.

I thought that making a pull request for c-lighting would not be right,
as ccan is a separate project, but I did not find a way to report this
at http://git.ozlabs.org/, where ccan repo resides.

Therefore I wrote to you directly.

[ Minor whitespace changes --RR ]
ccan/take/take.c