Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/serv.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/serv.c b/src/serv.c
index ea6435c..8757436 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -1436,11 +1436,11 @@ static void delport(struct porttab **table, struct porttab *ptmp)
void removeaport(struct porttab **table)
{
int aborted;
- struct porttab *ptmp;
+ struct porttab *ptmp = NULL;
selectport(table, &ptmp, &aborted);
- if (!aborted) {
+ if (!aborted && ptmp) {
delport(table, ptmp);
saveportlist(*table);
}
--
1.7.8.4