File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ static rpmdbMatchIterator mi = NULL;
136
136
137
137
static int init_rpm (void )
138
138
{
139
+ ongoing_rpm_operation = 1 ;
139
140
return rpmReadConfigFiles ((const char * )NULL , (const char * )NULL );
140
141
}
141
142
@@ -261,7 +262,7 @@ struct _hash_record {
261
262
extern unsigned int debug_mode ;
262
263
static int rpm_load_list (const conf_t * conf )
263
264
{
264
- int rc ;
265
+ int rc = 0 ;
265
266
unsigned int msg_count = 0 ;
266
267
unsigned int tsource = SRC_RPM ;
267
268
@@ -271,12 +272,10 @@ static int rpm_load_list(const conf_t *conf)
271
272
// hash table
272
273
struct _hash_record * hashtable = NULL ;
273
274
274
- ongoing_rpm_operation = 1 ;
275
-
276
275
msg (LOG_INFO , "Loading rpmdb backend" );
277
276
if ((rc = init_rpm ())) {
278
277
msg (LOG_ERR , "init_rpm() failed (%d)" , rc );
279
- return rc ;
278
+ goto error ;
280
279
}
281
280
282
281
// Loop across the rpm database
@@ -362,6 +361,7 @@ static int rpm_load_list(const conf_t *conf)
362
361
363
362
close_rpm ();
364
363
364
+ error :
365
365
ongoing_rpm_operation = 0 ;
366
366
close_fds_in_buffer ();
367
367
@@ -373,7 +373,7 @@ static int rpm_load_list(const conf_t *conf)
373
373
free ((void * )item );
374
374
}
375
375
376
- return 0 ;
376
+ return rc ;
377
377
}
378
378
379
379
static int rpm_init_backend (void )
You can’t perform that action at this time.
0 commit comments