summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-01-17 02:27:06 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-17 02:50:05 +0100
commit74051b9b5865586bf4d30b9075649af838fb92bd (patch)
tree1dd547147c395f7e3fec22285da4a83f54644d89 /src/core/socket.c
parent4b20075e2fbd99caee8b6a782050969a087a1a21 (diff)
units: for all unit settings that take lists, allow the empty string for resetting the lists
https://bugzilla.redhat.com/show_bug.cgi?id=756787
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index d75504051b..f2d854851d 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -102,8 +102,7 @@ static void socket_unwatch_control_pid(Socket *s) {
s->control_pid = 0;
}
-static void socket_done(Unit *u) {
- Socket *s = SOCKET(u);
+void socket_free_ports(Socket *s) {
SocketPort *p;
assert(s);
@@ -119,6 +118,14 @@ static void socket_done(Unit *u) {
free(p->path);
free(p);
}
+}
+
+static void socket_done(Unit *u) {
+ Socket *s = SOCKET(u);
+
+ assert(s);
+
+ socket_free_ports(s);
exec_context_done(&s->exec_context);
exec_command_free_array(s->exec_command, _SOCKET_EXEC_COMMAND_MAX);