Skip to content

Commit 13856f9

Browse files
asottilexzyfer
authored andcommitted
Don't use strdup (non portable)
1 parent a3c3a76 commit 13856f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace Sass {
132132

133133
Context::~Context()
134134
{
135-
// resources were allocated by strdup or malloc
135+
// resources were allocated by malloc
136136
for (size_t i = 0; i < resources.size(); ++i) {
137137
free(resources[i].contents);
138138
free(resources[i].srcmap);

src/sass_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extern "C" {
1818
{
1919
Sass_Function_Entry cb = (Sass_Function_Entry) calloc(1, sizeof(Sass_Function));
2020
if (cb == 0) return 0;
21-
cb->signature = strdup(signature);
21+
cb->signature = sass_copy_c_string(signature);
2222
cb->function = function;
2323
cb->cookie = cookie;
2424
return cb;

0 commit comments

Comments
 (0)