A general rule is to set aside 15-20% of your initial budget aside for additional maintenance costs. This money could be used in case of malware attacks, bug fixes or additional improvements. Regardless of how your maintenance costs are used, you will be thankful you set aside the money beforehand when you incur unplanned maintenance costs. However, if your app is successful, it might make you revenue you can use for these maintenance costs. Even free apps can make money!