From: Adam C. Emerson Date: Tue, 8 Mar 2022 01:48:40 +0000 (-0500) Subject: rgw: Fix uninitialized warning X-Git-Tag: v18.0.0~1151^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e3ec75acb8716592689960724923cb07c1555a56;p=ceph-ci.git rgw: Fix uninitialized warning Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/rgw_kms.cc b/src/rgw/rgw_kms.cc index 4718136bb92..dc23f450bdc 100644 --- a/src/rgw/rgw_kms.cc +++ b/src/rgw/rgw_kms.cc @@ -80,7 +80,7 @@ public: return r; } void* Realloc(void* p, size_t old, size_t nw) { - void *r; + void *r = nullptr; if (nw) r = malloc(nw); if (nw > old) nw = old; if (r && old) memcpy(r, p, nw);