Skip to content

Commit

Permalink
fix(Cursor): fix a memory leak detected by valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
apocelipes committed Dec 1, 2023
1 parent 390801a commit 90e6a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/cursor/cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ void ffGenerateCursorJsonResult(FF_MAYBE_UNUSED FFCursorOptions* options, yyjson

if (result.error.length)
{
yyjson_mut_obj_add_str(doc, module, "error", result.error.chars);
yyjson_mut_obj_add_strbuf(doc, module, "error", &result.error);
ffStrbufDestroy(&result.error);
return;
}

Expand Down

0 comments on commit 90e6a19

Please sign in to comment.