Flare activity of the long-period variable star R Leonis