Skip to content

Commit cb7a7fd

Browse files
committed
fix warning: 'payload' may be used uninitialized in this function (ok, was a false positive)
1 parent 2bce9bc commit cb7a7fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

php_memcached.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ static void php_memc_store_impl(INTERNAL_FUNCTION_PARAMETERS, int op, zend_bool
13931393
zval *value;
13941394
long expiration = 0;
13951395
long udf_flags = 0;
1396-
char *payload;
1396+
char *payload = NULL;
13971397
size_t payload_len;
13981398
uint32_t flags = 0;
13991399
uint32_t retry = 0;
@@ -1556,7 +1556,7 @@ static void php_memc_store_impl(INTERNAL_FUNCTION_PARAMETERS, int op, zend_bool
15561556
RETVAL_TRUE;
15571557
}
15581558

1559-
if (op != MEMC_OP_TOUCH) {
1559+
if (payload) {
15601560
efree(payload);
15611561
}
15621562
}

0 commit comments

Comments
 (0)