Section 407(7) in The Code of Criminal Procedure, 1973
(7)Where an application for an order under sub-section (1) is dismissed, the High Court may, if it is of opinion that the application was frivolous or vexatious, order the applicant to pay by way of compensation to any person who has opposed the application, such sum not exceeding one thousand rupees as it may consider proper in the circumstances of the case.