Skip to content

Commit 3afc12b

Browse files
authored
Merge pull request confluentinc#155 from axiros/exception_memory_leak
Fix memory leak on errors.
2 parents 9227fe6 + 69de8c0 commit 3afc12b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

confluent_kafka/src/confluent_kafka.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ PyObject *KafkaError_new_or_None (rd_kafka_resp_err_t err, const char *str);
105105
#define cfl_PyErr_Format(err,...) do { \
106106
PyObject *_eo = KafkaError_new0(err, __VA_ARGS__); \
107107
PyErr_SetObject(KafkaException, _eo); \
108+
Py_DECREF(_eo); \
108109
} while (0)
109110

110111

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy