Skip to content

Commit 304c93b

Browse files
committed
string construction fix
1 parent b28feaf commit 304c93b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils/nix2mx.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ nix::NDSize mx_array_to_ndsize(const mxArray *arr) {
8282
std::string mx_array_to_str(const mxArray *arr) {
8383
check_arg_type(arr, nix::DataType::String);
8484

85-
char *tmp = mxArrayToString(arr);
86-
std::string the_string(tmp);
87-
mxFree(tmp);
85+
std::string the_string = mxArrayToString(arr);
8886
return the_string;
8987
}
9088

0 commit comments

Comments
 (0)