Is there is recommandations, hints on do-do-not-do when ISR requires to allocate dynamic memory?
One more solution:
Process the data inside the interrupt, in case processing the data will be quick.