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 Paul Koning
parent 2c8938711c
commit 96de0748d4

2
scp.c
View file

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