From a61ece2022f9e765d65dcd0ed22dba7e71e138a2 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 10 Feb 2012 00:06:58 +0100 Subject: srd: Add/improve g_malloc() error messages. --- type_decoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'type_decoder.c') diff --git a/type_decoder.c b/type_decoder.c index 9c2cfd6..028865b 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -124,8 +124,10 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args) di->instance_id, start_sample, end_sample, OUTPUT_TYPES[pdo->output_type], output_id); - if (!(pdata = g_try_malloc0(sizeof(struct srd_proto_data)))) + if (!(pdata = g_try_malloc0(sizeof(struct srd_proto_data)))) { + srd_err("Failed to g_malloc() struct srd_proto_data."); return NULL; + } pdata->start_sample = start_sample; pdata->end_sample = end_sample; pdata->pdo = pdo; -- cgit v1.2.3-70-g09d2