diff --git a/standard/appspawn_service.c b/standard/appspawn_service.c index dfd7f994e86077830ff3c8b4e03a141f151c8fb5..32e106fd96f9d8e72e5411b8788fafba882d6f3a 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)); }