diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-19 19:33:29 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-19 19:33:29 +0000 |
commit | 7ecafe6b63061bd8d3377f3960b50681feb60be2 (patch) | |
tree | e12db36ae8e9e15caf81a84da05228e7731c2c59 /gcc/jit/jit-recording.c | |
parent | 31deae56ec869e87dafced637ac1282b4c45ef18 (diff) | |
download | gcc-7ecafe6b63061bd8d3377f3960b50681feb60be2.tar.gz |
Handle NULL in gcc_jit_context_set_str_option
gcc/jit/ChangeLog:
* jit-recording.c (gcc::jit::recording::context::set_str_option):
Handle NULL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218969 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/jit/jit-recording.c')
-rw-r--r-- | gcc/jit/jit-recording.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c index 9d6d26a92a1..7d9da247392 100644 --- a/gcc/jit/jit-recording.c +++ b/gcc/jit/jit-recording.c @@ -831,7 +831,7 @@ recording::context::set_str_option (enum gcc_jit_str_option opt, return; } free (m_str_options[opt]); - m_str_options[opt] = xstrdup (value); + m_str_options[opt] = value ? xstrdup (value) : NULL; } /* Set the given integer option for this context, or add an error if |