Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3175c8e9 authored by Tom Marlin's avatar Tom Marlin
Browse files

Fixed memory leak when using transport:serial.



Fixed memory leak when using transport:serial. Code was previously
using strdup() to make a copy of the serial number which was not
necessary. Instead, just set serial=service.

Change-Id: Ifa8fe7999c6fb88955d2c6bdfcd3cd724ec1f020
Signed-off-by: default avatarTom Marlin <tomm@bsquare.com>
parent 212282c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1108,7 +1108,7 @@ int handle_host_request(char *service, transport_type ttype, char* serial, int r
            type = kTransportAny;
        } else if (!strncmp(service, "transport:", strlen("transport:"))) {
            service += strlen("transport:");
            serial = strdup(service);
            serial = service;
        }

        transport = acquire_one_transport(CS_ANY, type, serial, &error_string);