From: Bert Vermeulen Date: Mon, 30 Jan 2012 00:23:35 +0000 (+0100) Subject: srd: removed stray malloc() X-Git-Tag: libsigrokdecode-0.1.0~81 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6fff00eee1dd62477cd2708df480b985ef416a67;p=libsigrokdecode.git srd: removed stray malloc() --- diff --git a/decoder.c b/decoder.c index 7480656..efb1f9a 100644 --- a/decoder.c +++ b/decoder.c @@ -351,9 +351,6 @@ int srd_load_all_decoders(void) /* The decoder name is the PD directory name (e.g. "i2c"). */ decodername = g_strdup(direntry); - if (!(dec = g_try_malloc(sizeof(struct srd_decoder)))) - return SRD_ERR_MALLOC; - if ((ret = srd_load_decoder(decodername, &dec)) == SRD_OK) { /* Append it to the list of supported/loaded decoders. */ pd_list = g_slist_append(pd_list, dec);