Skip to content

Commit

Permalink
core: fix memory leak by freeing rsvg handle (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cudiph authored Jan 29, 2025
1 parent 9c5dd1f commit dcadd33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libhyprcursor/hyprcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,14 @@ bool CHyprcursorManager::loadThemeStyle(const SCursorStyleInfo& info) {

if (!rsvg_handle_render_document(handle, PCAIRO, &rect, &error)) {
Debug::log(HC_LOG_ERR, logFn, "Failed rendering svg: {}", error->message);
g_object_unref(handle);
return false;
}

// done
cairo_surface_flush(newImage->cairoSurface);
cairo_destroy(PCAIRO);
g_object_unref(handle);
}
} else {
Debug::log(HC_LOG_ERR, logFn, "Invalid shapetype in loadThemeStyle");
Expand Down

0 comments on commit dcadd33

Please sign in to comment.