Fix memory leak in xgmmsgid processing