Fix a memory leak in the setting of custom field names
Fix a memory leak in the setting of custom field names

Commit d0be5482 'receiptomatic-www: Rework custom field names' set the
initial field names using malloc/strcpy later these would be overidden
by a strdup of the custom name, these would be later free'd but the
first malloc was lost.

We simplyfy set_default_field_names() by doing a strdup instead of
a malloc/strcpy pair. Then in set_custom_field_names() we free the
field name before strdup'ing the new one.

Signed-off-by: Andrew Clayton <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@opentechlabs.co.uk>

ac000/receiptomatic