summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nsswitch/libwbclient/wbc_util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c
index d2783f30d2..6d7a96c898 100644
--- a/nsswitch/libwbclient/wbc_util.c
+++ b/nsswitch/libwbclient/wbc_util.c
@@ -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));