Commit ffb19c51 authored by Christian Kandeler's avatar Christian Kandeler Committed by hjk
Browse files

Fix Core::Id cleanup.



qstrdup() uses new[] to allocate the array.

Change-Id: I014cfb697d792ff7bae5f1fdc58d8e6069f06e14
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent b25dfed9
......@@ -39,6 +39,8 @@
#include <QHash>
#include <QVector>
#include <string.h>
namespace Core {
/*!
......@@ -107,7 +109,7 @@ static int theId(const char *str)
if (lastUid == 0)
stringFromId.append(QByteArray());
res = ++lastUid;
sh.str = qstrdup(sh.str);
sh.str = strdup(sh.str);
idFromString[sh] = res;
stringFromId.append(QByteArray::fromRawData(sh.str, sh.n));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment