timefilter: Handle memory allocation failure