From b9c2180886dc759403c837564cf39a4d030fea52 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 2 Aug 2011 11:05:55 -0500 Subject: [PATCH] core: fix serial port flashing after d3c2228f7b55465f4433bedb36d47744b8d791f1 (bgo #650740) Fix one more possible memory leak (left un-fixed by d3c2228 but not caused by it) and ensure that modems that do want flashing get it by default by adding the missing G_PARAM_CONSTRUCT so FLASH_OK defaults to TRUE. --- src/mm-serial-port.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c index 00d35d5e..732cb322 100644 --- a/src/mm-serial-port.c +++ b/src/mm-serial-port.c @@ -1228,6 +1228,8 @@ mm_serial_port_flash (MMSerialPort *self, success = set_speed (self, B0, &error); if (!success && !ignore_errors) goto error; + g_clear_error (&error); + priv->flash_id = g_timeout_add (flash_time, flash_do, info); } else priv->flash_id = g_idle_add (flash_do, info); @@ -1536,7 +1538,7 @@ mm_serial_port_class_init (MMSerialPortClass *klass) "Flashing the port (0 baud for a short period) " "is allowed.", TRUE, - G_PARAM_READWRITE)); + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); /* Signals */ signals[BUFFER_FULL] =