daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
803fb7
From 94f823629031f8849c8dc001d56a2c057531f0f2 Mon Sep 17 00:00:00 2001
803fb7
From: Lennart Poettering <lennart@poettering.net>
803fb7
Date: Wed, 28 Oct 2015 18:22:23 +0100
803fb7
Subject: [PATCH] nspawn: fix minor memory leak
803fb7
803fb7
When rebooting nspawn containers about 400 times we'd otherwise hit the
803fb7
fd limit and refuse further reboots.
803fb7
803fb7
Cherry-picked from: 3c747da38ca2f0642b4811812f6e2e2e1449a622
803fb7
Related: #1331667
803fb7
---
803fb7
 src/shared/ptyfwd.c | 1 +
803fb7
 1 file changed, 1 insertion(+)
803fb7
803fb7
diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c
803fb7
index 31274a141..88b3f4e3c 100644
803fb7
--- a/src/shared/ptyfwd.c
803fb7
+++ b/src/shared/ptyfwd.c
803fb7
@@ -388,6 +388,7 @@ PTYForward *pty_forward_free(PTYForward *f) {
803fb7
                 sd_event_source_unref(f->stdin_event_source);
803fb7
                 sd_event_source_unref(f->stdout_event_source);
803fb7
                 sd_event_source_unref(f->master_event_source);
803fb7
+                sd_event_source_unref(f->sigwinch_event_source);
803fb7
                 sd_event_unref(f->event);
803fb7
 
803fb7
                 if (f->saved_stdout)