FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allocate the correct amount of memory · nodegit/nodegit@1a74a2d · GitHub

Repository navigation

Commit 1a74a2d

Browse files
committed
Allocate the correct amount of memory
1 parent 22430ec commit 1a74a2d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎generate/templates/manual/src/str_array_converter.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ git_strarray *StrArrayConverter::Convert(Handle<v8::Value> val) {
2525
}
2626

2727
git_strarray *StrArrayConverter::ConvertArray(Array *val) {
28-
git_strarray *result = (git_strarray *)malloc(sizeof(git_strarray*));
28+
git_strarray *result = (git_strarray *)malloc(sizeof(git_strarray));
2929
result->count = val->Length();
3030
result->strings = (char **)malloc(sizeof(char*) * result->count);
3131

@@ -47,7 +47,7 @@ git_strarray* StrArrayConverter::ConvertString(Handle<String> val) {
4747
}
4848

4949
git_strarray *StrArrayConverter::ConstructStrArray(int argc, char** argv) {
50-
git_strarray *result = (git_strarray *)malloc(sizeof(git_strarray*));
50+
git_strarray *result = (git_strarray *)malloc(sizeof(git_strarray));
5151
result->count = argc;
5252
result->strings = (char **)malloc(sizeof(char*) * result->count);
5353

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL