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

Commit f583ff66 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix a potential memory leak"

parents 1a955faa f26cf6d5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -478,11 +478,17 @@ asocket* host_service_to_socket(const char* name, const char* serial) {
            return nullptr;
        }

        int fd = create_service_thread(wait_for_state, sinfo.release());
        int fd = create_service_thread(wait_for_state, sinfo.get());
        if (fd != -1) {
            sinfo.release();
        }
        return create_local_socket(fd);
    } else if (!strncmp(name, "connect:", 8)) {
        char* host = strdup(name + 8);
        int fd = create_service_thread(connect_service, host);
        if (fd == -1) {
            free(host);
        }
        return create_local_socket(fd);
    }
    return NULL;