srd: removed stray malloc()
authorBert Vermeulen <bert@biot.com>
Mon, 30 Jan 2012 00:23:35 +0000 (01:23 +0100)
committerBert Vermeulen <bert@biot.com>
Mon, 30 Jan 2012 00:23:35 +0000 (01:23 +0100)
decoder.c

index 7480656e41a80628427467e14eab26e8da9e0dc5..efb1f9ae4bdd8b2ac827a2aec123455178cf53aa 100644 (file)
--- 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);
 
                /* 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);
                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);