Revert part of r50415. As pointed out by Jakub, some of the value_string

functions are called when no dissection is going on, and so can't use
wmem_packet_scope().

svn path=/trunk/; revision=50428
This commit is contained in:
Evan Huus 2013-07-06 23:53:09 +00:00
parent 5ef777c80b
commit afa7538f12
1 changed files with 5 additions and 4 deletions

View File

@ -27,6 +27,7 @@
#include "config.h"
#include "emem.h"
#include "wmem/wmem.h"
#include "proto.h"
#include "to_str.h"
@ -48,7 +49,7 @@ val_to_str(const guint32 val, const value_string *vs, const char *fmt)
if (ret != NULL)
return ret;
return wmem_strdup_printf(wmem_packet_scope(), fmt, val);
return ep_strdup_printf(fmt, val);
}
/* Tries to match val against each element in the value_string array vs.
@ -248,7 +249,7 @@ val_to_str_ext(const guint32 val, const value_string_ext *vse, const char *fmt)
if (ret != NULL)
return ret;
return wmem_strdup_printf(wmem_packet_scope(), fmt, val);
return ep_strdup_printf(fmt, val);
}
/* Like val_to_str_const for extended value strings */
@ -433,7 +434,7 @@ str_to_str(const gchar *val, const string_string *vs, const char *fmt)
if (ret != NULL)
return ret;
return wmem_strdup_printf(wmem_packet_scope(), fmt, val);
return ep_strdup_printf(fmt, val);
}
/* Like try_val_to_str_idx except for string_string */
@ -481,7 +482,7 @@ rval_to_str(const guint32 val, const range_string *rs, const char *fmt)
if(ret != NULL)
return ret;
return wmem_strdup_printf(wmem_packet_scope(), fmt, val);
return ep_strdup_printf(fmt, val);
}
/* Like try_val_to_str_idx except for range_string */