Skip to content

Commit 4c923c2

Browse files
committed
Merge branch 'REL_2_5' into REL_2_6
2 parents 681ca5e + be949fd commit 4c923c2

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/utils/configuration.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ config_get_opt(int argc, char **argv, ConfigOption cmd_options[],
538538
assign_option(opt, optarg, SOURCE_CMD);
539539
}
540540

541+
pgut_free(optstring);
542+
pgut_free(longopts);
543+
541544
return optind;
542545
}
543546

src/utils/pgut.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,12 @@ pgut_str_strip_trailing_filename(const char *filepath, const char *filename)
979979
return pgut_strndup(filepath, fp_len);
980980
}
981981

982+
void
983+
pgut_free(void *p)
984+
{
985+
free(p);
986+
}
987+
982988
#ifdef WIN32
983989
static int select_win32(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval * timeout);
984990
#define select select_win32

src/utils/pgut.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ extern void *pgut_realloc(void *p, size_t size);
6565
extern char *pgut_strdup(const char *str);
6666
extern char *pgut_strndup(const char *str, size_t n);
6767
extern char *pgut_str_strip_trailing_filename(const char *filepath, const char *filename);
68+
extern void pgut_free(void *p);
6869

6970
#define pgut_new(type) ((type *) pgut_malloc(sizeof(type)))
7071
#define pgut_new0(type) ((type *) pgut_malloc0(sizeof(type)))

0 commit comments

Comments
 (0)