diff --git a/standard/appspawn_service.c b/standard/appspawn_service.c index dfd7f994e86077830ff3c8b4e03a141f151c8fb5..d4690e0e6132be4964657d82d4ccb5e97bc87c74 100644 --- a/standard/appspawn_service.c +++ b/standard/appspawn_service.c @@ -503,7 +503,9 @@ AppSpawnContent *AppSpawnCreateContent(const char *socketName, char *longProcNam return NULL, "Failed to create socket for %s", path); // create socket ret = chmod(path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); - APPSPAWN_CHECK(ret == 0, free(appSpawnContent); + APPSPAWN_CHECK(ret == 0, + LE_CloseStreamTask(LE_GetDefaultLoop(), appSpawnContent->server); + free(appSpawnContent); return NULL, "Failed to chmod %s, err %d. ", path, errno); APPSPAWN_LOGI("AppSpawnCreateContent path %s fd %d", path, LE_GetSocketFd(appSpawnContent->server)); }