summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-10-17 13:58:47 -0600
committerBrian Paul <[email protected]>2017-10-23 15:10:32 -0600
commit89372220b3f0cc4f6894119bc0eff3cf86e7bd9f (patch)
treed9bdb6adbb16d62f91b8934ead0d1e88e055f550 /src/mesa/program
parentacd6ea0cc03501f5c79107749ec8a84e69c7979d (diff)
mesa: use util_strdup() macro in symbol_table.c
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/symbol_table.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/program/symbol_table.c b/src/mesa/program/symbol_table.c
index 37066c904cc..f5dacbbf1ed 100644
--- a/src/mesa/program/symbol_table.c
+++ b/src/mesa/program/symbol_table.c
@@ -24,6 +24,7 @@
#include "main/imports.h"
#include "symbol_table.h"
#include "../../util/hash_table.h"
+#include "util/u_string.h"
struct symbol {
/** Symbol name. */
@@ -192,7 +193,7 @@ _mesa_symbol_table_add_symbol(struct _mesa_symbol_table *table,
new_sym->next_with_same_name = sym;
new_sym->name = sym->name;
} else {
- new_sym->name = strdup(name);
+ new_sym->name = util_strdup(name);
if (new_sym->name == NULL) {
free(new_sym);
_mesa_error_no_memory(__func__);
@@ -264,7 +265,7 @@ _mesa_symbol_table_add_global_symbol(struct _mesa_symbol_table *table,
sym->name = inner_sym->name;
} else {
- sym->name = strdup(name);
+ sym->name = util_strdup(name);
if (sym->name == NULL) {
free(sym);
_mesa_error_no_memory(__func__);