pyldb: Handle allocation failure
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 13 Feb 2023 01:57:24 +0000 (14:57 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 12 Apr 2023 13:52:31 +0000 (13:52 +0000)
commit894500b670883518a59f12f6ad276cb4e154c181
tree15801df393e26902e9f26d59de2e6250479750b3
parent440c3e869718b6e1e7d1641ae2d12ffed96feabf
pyldb: Handle allocation failure

If we don't check for NULL after each loop iteration, the failure could
be masked in the next iteration by talloc_asprintf_append() allocating
on the NULL context. That could result in values getting lost.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/ldb/pyldb.c