Otherwise it breaks after longjmp if allocated on stack, for example in bthrow().
* The UCW Library -- Transactions
*
* (c) 2008--2011 Martin Mares <mj@ucw.cz>
+ * (c) 2021 Pavel Charvat <pchar@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
if (!mp)
vdie(fmt, args);
struct exception *x = mp_alloc(mp, sizeof(*x));
- x->id = id;
+ x->id = mp_strdup(mp, id);
x->object = object;
x->msg = mp_vprintf(mp, fmt, args);
trans_throw_exc(x);