1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

libwbclient: CID 2199 -- NULL pointer return

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Mar 15 12:08:48 CET 2011 on sn-devel-104
This commit is contained in:
Volker Lendecke 2011-03-15 11:19:57 +01:00 committed by Volker Lendecke
parent d9a58791b0
commit a6a722b5ba

View File

@ -787,6 +787,10 @@ wbcErr wbcAddNamedBlob(size_t *num_blobs,
*num_blobs + 2, sizeof(struct wbcNamedBlob),
wbcNamedBlobDestructor);
if (blobs == NULL) {
return WBC_ERR_NO_MEMORY;
}
if (*pblobs != NULL) {
struct wbcNamedBlob *old = *pblobs;
memcpy(blobs, old, sizeof(struct wbcNamedBlob) * (*num_blobs));