1
0
mirror of https://github.com/simh/simh.git synced 2026-05-06 23:47:06 +00:00

SCP: Don't malloc ep->match_pattern twice

This commit is contained in:
Seth Morabito
2023-06-07 17:21:43 -07:00
committed by Mark Pizzolato
parent a496c85e1c
commit fe40ece9f2

2
scp.c
View File

@@ -13593,8 +13593,6 @@ else {
ep->match = match_buf;
ep->size = match_size;
}
ep->match_pattern = (char *)malloc (strlen (match) + 1);
strcpy (ep->match_pattern, match);
if (ep->act) { /* replace old action? */
free (ep->act); /* deallocate */
ep->act = NULL; /* now no action */