xrdp-next/xrdp-0.9.12-segfault.patch
Bojan Smojver 8cd3c1ad8e Patch a segfault.
Issue #1487 and #1501, pointed out by oden dot eriksson at vattenfall dot com.
2020-02-22 10:42:26 +11:00

28 lines
826 B
Diff

From 72bece526bb5863d99a52546374c0c3b1561a61a Mon Sep 17 00:00:00 2001
From: Derek Schrock <dereks@lifeofadishwasher.com>
Date: Mon, 27 Jan 2020 21:11:38 -0500
Subject: [PATCH] return from xfs_delete_xfs_fs if NULL
---
sesman/chansrv/chansrv_xfs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sesman/chansrv/chansrv_xfs.c b/sesman/chansrv/chansrv_xfs.c
index a63c1604b..feff7e2b3 100644
--- a/sesman/chansrv/chansrv_xfs.c
+++ b/sesman/chansrv/chansrv_xfs.c
@@ -387,7 +387,12 @@ xfs_create_xfs_fs(mode_t umask, uid_t uid, gid_t gid)
void
xfs_delete_xfs_fs(struct xfs_fs *xfs)
{
- if (xfs != NULL && xfs->inode_table != NULL)
+ if (xfs == NULL)
+ {
+ return;
+ }
+
+ if (xfs->inode_table != NULL)
{
size_t i;
for (i = 0 ; i < xfs->inode_count; ++i)