It's never black and white when it comes to food aid. Back in the eighties during the famous Live Aid period. Much of Ethiopia had plenty of food while other parts were starving. There are any number of examples. Surplus American grain for example, generously sent to Africa often has the effect of contributing to the problem. Cheap or free and plentiful grain depressed the local market so much that the local farmers cannot compete and they up on food aid themselves. Ironic really.
There's ads on TV from a charity looking for donations claiming they can end hunger. Well I remember 35 years ago taking part in a fast to raise money for the same charity. Back then they claimed they could end hunger. I no longer believe them.
That rotting wheat would do little in the larger scheme of things. Worse it could have the same effect as the one above.
If anyone has a solution for this intractable problem they're keeping it quiet.