From 2da5f255316109126237be8e46952beca23f0e2f Mon Sep 17 00:00:00 2001 From: Hansraj Das Date: Fri, 16 Aug 2019 01:44:29 +0530 Subject: [PATCH] Fix unintialized pointer warning in Objects/obmalloc.c * Initialize ptr with NULL pointer while declaring --- Objects/obmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index 6ca7cd84eda822..ae7681c0966e3d 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -1641,7 +1641,7 @@ pymalloc_alloc(void *ctx, void **ptr_p, size_t nbytes) static void * _PyObject_Malloc(void *ctx, size_t nbytes) { - void* ptr; + void* ptr = NULL; if (LIKELY(pymalloc_alloc(ctx, &ptr, nbytes))) { return ptr; }