summaryrefslogtreecommitdiff
path: root/hw/i2c/i2c_mux_pca954x.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i2c/i2c_mux_pca954x.c')
-rw-r--r--hw/i2c/i2c_mux_pca954x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c
index a9517b612a..3945de795c 100644
--- a/hw/i2c/i2c_mux_pca954x.c
+++ b/hw/i2c/i2c_mux_pca954x.c
@@ -71,7 +71,7 @@ static bool pca954x_match(I2CSlave *candidate, uint8_t address,
/* They are talking to the mux itself (or all devices enabled). */
if ((candidate->address == address) || broadcast) {
- I2CNode *node = g_malloc(sizeof(struct I2CNode));
+ I2CNode *node = g_new(struct I2CNode, 1);
node->elt = candidate;
QLIST_INSERT_HEAD(current_devs, node, next);
if (!broadcast) {