summaryrefslogtreecommitdiff
path: root/src/or/protover_rust.c
diff options
context:
space:
mode:
authorChelsea Holland Komlo <me@chelseakomlo.com>2017-09-28 03:08:37 +0000
committerNick Mathewson <nickm@torproject.org>2017-10-27 10:02:08 -0400
commit0c04b54d4d78f7f3117948358b3d05e644fa1aeb (patch)
tree6c554a44f392a4fd0845e5c466955c43cdcea002 /src/or/protover_rust.c
parentd1820c1516a31a149fc51a9e5126bf899e4c4e08 (diff)
downloadtor-0c04b54d4d78f7f3117948358b3d05e644fa1aeb.tar.gz
tor-0c04b54d4d78f7f3117948358b3d05e644fa1aeb.zip
minimize scope for unsafe
update documentation missing check for null
Diffstat (limited to 'src/or/protover_rust.c')
-rw-r--r--src/or/protover_rust.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/protover_rust.c b/src/or/protover_rust.c
index ebe815357b..261555d1ec 100644
--- a/src/or/protover_rust.c
+++ b/src/or/protover_rust.c
@@ -85,7 +85,7 @@ protover_all_supported(const char *s, char **missing_out)
rust_str_ref_t missing_out_copy = NULL;
int is_supported = rust_protover_all_supported(s, &missing_out_copy);
- if (!is_supported) {
+ if (!is_supported && missing_out_copy != NULL) {
move_rust_str_to_c_and_free(missing_out_copy, missing_out);
}