D27986: Allow providing an error message from the application

Harald Sitter noreply at phabricator.kde.org
Fri Mar 13 10:34:18 GMT 2020


sitter added inline comments.

INLINE COMMENTS

> kcrash.cpp:107
> +
> +static char* s_kcrashErrorMessage;
>  Q_GLOBAL_STATIC(KCrash::CoreConfig, s_coreConfig)

- on wrong side of space

needs defining to nullptr

> kcrash.cpp:994
> +{
> +    s_kcrashErrorMessage = qstrdup(message.toUtf8().constData());
> +}

I fear that is now leaking when the function is called more than once

  if (s_kcrashErrorMessage) {
  free(s_kcrashErrorMessage);
  }

REPOSITORY
  R285 KCrash

REVISION DETAIL
  https://phabricator.kde.org/D27986

To: apol, #frameworks, sitter, dfaure
Cc: dfaure, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200313/ec145377/attachment.html>


More information about the Kde-frameworks-devel mailing list