aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes
diff options
context:
space:
mode:
Diffstat (limited to 'epan/ftypes')
-rw-r--r--epan/ftypes/ftype-string.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/ftypes/ftype-string.c b/epan/ftypes/ftype-string.c
index 57d7d82352..97cf811dfe 100644
--- a/epan/ftypes/ftype-string.c
+++ b/epan/ftypes/ftype-string.c
@@ -90,12 +90,12 @@ val_from_unparsed(fvalue_t *fv, const char *s, gboolean allow_partial_value _U_,
{
fvalue_t *fv_bytes;
- /* Free up the old value, if we have one */
- string_fvalue_free(fv);
-
/* Does this look like a byte-string? */
fv_bytes = fvalue_from_unparsed(FT_BYTES, s, TRUE, NULL);
if (fv_bytes) {
+ /* Free up the old value, if we have one */
+ string_fvalue_free(fv);
+
/* Copy the bytes over to a string and terminate it
* with a NUL. XXX - what if the user embeds a NUL
* in the middle of the byte string? */
@@ -107,10 +107,10 @@ val_from_unparsed(fvalue_t *fv, const char *s, gboolean allow_partial_value _U_,
FVALUE_FREE(fv_bytes);
return TRUE;
+ } else {
+ /* Just turn it into a string */
+ return val_from_string(fv, s, err_msg);
}
-
- /* Just turn it into a string */
- return val_from_string(fv, s, err_msg);
}
static guint