summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sessions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sessions.c b/src/sessions.c
index b0ca9b374..94752482c 100644
--- a/src/sessions.c
+++ b/src/sessions.c
@@ -325,7 +325,7 @@ int exception_add(User * u, const char *mask, const int limit,
}
nexceptions++;
- exceptions = new Exception[nexceptions];
+ exceptions = static_cast<Exception *>(srealloc(exceptions, sizeof(Exception) * nexceptions));
exceptions[nexceptions - 1].mask = sstrdup(mask);
exceptions[nexceptions - 1].limit = limit;