mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-05 01:50:29 +01:00
Fix an incorrect sizeof.
Fix an incorrect sizeof which leads to allocation of more memory than actually needed. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69329 [elide redundant "* sizeof (char)" which is 1 by definition -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
9577e33c89
commit
990fd63f4e
1 changed files with 1 additions and 1 deletions
|
|
@ -310,7 +310,7 @@ main (int argc, char *argv[])
|
|||
filters = (char **) realloc (filters, numFilters * sizeof (char *));
|
||||
if (filters == NULL)
|
||||
oom ("adding a new filter slot");
|
||||
filters[j] = (char *) malloc (filter_len * sizeof (char *));
|
||||
filters[j] = (char *) malloc (filter_len);
|
||||
if (filters[j] == NULL)
|
||||
oom ("adding a new filter");
|
||||
snprintf (filters[j], filter_len, "%s,%s", EAVESDROPPING_RULE, arg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue